Fix build ServiceHost

Fix build ServiceHost

--- InfinniPlatform.ServiceHost/Properties/AssemblyInfo.cs
+++ InfinniPlatform.ServiceHost/Properties/AssemblyInfo.cs
@@ -1,8 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("InfinniPlatform.ServiceHost")]
-[assembly: AssemblyDescription("InfinniPlatform.ServiceHost")]
-[assembly: Guid("fdd14430-694c-4ca1-af53-3abe28a65734")]
-[assembly: InternalsVisibleTo("InfinniPlatform.ServiceHost.Tests")]


Starting to add the tcp connections

Starting to add the tcp connections

--- Iris.Network/IrisNetworkManager.cs
+++ Iris.Network/IrisNetworkManager.cs
@@ -26,6 +26,10 @@

         private IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Parse("239.255.255.250"), 1900);

+        private TcpListener tcpServer;
+
+        private List<TcpClient> tcpClients = new List<TcpClient>();
+
         public IrisNetworkManager(IConfigurationService configurationService)
         {
             ConfigurationService = configurationService;
@@ -35,6 +39,10 @@

         public void Initialize()
         {
+            tcpServer = new TcpListener(IPAddress.Any, 1901);
+
+            tcpServer.BeginAcceptTcpClient()
+
             sender = new UdpClient();

             sender.DontFragment = true;


Fix icon on registration page

Fix icon on registration page

--- JoinRpg.Portal/Views/Account/_RegistrationRules.cshtml
+++ JoinRpg.Portal/Views/Account/_RegistrationRules.cshtml
@@ -6,7 +6,7 @@
         Если у вас будут какие-то проблемы, пишите в поддержку ( support@joinrpg.ru
         /

-
+
         ). Мы всегда рады помочь, но обратите внимание: вы ничего не платите нам, и, следовательно, не являетесь нашим клиентом. Мы поддерживаем сайт бесплатно и в свободное время, у нас есть работа, семья, личная жизнь, другие хобби.

Большую часть игр организуем не мы :-) По всем игровым вопросам обращайтесь к мастерам (организаторам) конкретной игры. Мы не обладаем временем или компетенцией, чтобы понять, будет ли игра хорошей или плохой — пообщайтесь с мастерами и составьте свое впечатление.


Cleaned up add user form - need to get image upload working

--- JustPressPlay/JustPressPlay/Views/Admin/AddUser.cshtml
+++ JustPressPlay/JustPressPlay/Views/Admin/AddUser.cshtml
@@ -16,63 +16,104 @@

-
-

-
Add User

-

-
-

-                @if( ViewBag.Message != null )
+            @if( ViewBag.Message != null )
                 {
 	                @ViewBag.Message

                 }

-                @using (Html.BeginForm("AddUser", "Admin", FormMethod.Post, new { enctype = "multipart/form-data"})) {
+                @using (Html.BeginForm()) {
 	                @Html.AntiForgeryToken()
 	                @Html.ValidationSummary()
-
-
-
-				    @Html.LabelFor(m => m.Username)
-                    @Html.TextBoxFor(m => m.Username)
-				    @Html.ValidationMessageFor(m => m.Username)
-
-				    @Html.LabelFor(m => m.Password)
-				    @Html.PasswordFor(m => m.Password)
-				    @Html.ValidationMessageFor(m => m.Password)
-
-				    @Html.LabelFor(m => m.ConfirmPassword)
-				    @Html.PasswordFor(m => m.ConfirmPassword)
-				    @Html.ValidationMessageFor(m => m.ConfirmPassword)
-
-				    @Html.LabelFor(m => m.Email)
-				    @Html.TextBoxFor(m => m.Email)
-				    @Html.ValidationMessageFor(m => m.Email)
-
-				    @Html.LabelFor(m => m.DisplayName)
-				    @Html.TextBoxFor(m => m.DisplayName)
-				    @Html.ValidationMessageFor(m => m.DisplayName)
-
-				    @Html.LabelFor(m => m.IsPlayer)
-				    @Html.CheckBoxFor(m => m.IsPlayer)
-				    @Html.ValidationMessageFor(m => m.IsPlayer)
-
-				    @Html.LabelFor(m => m.FirstName)
-				    @Html.TextBoxFor(m => m.FirstName)
-				    @Html.ValidationMessageFor(m => m.FirstName)
-
-				    @Html.LabelFor(m => m.MiddleName)
-				    @Html.TextBoxFor(m => m.MiddleName)
-				    @Html.ValidationMessageFor(m => m.MiddleName)
-
-				    @Html.LabelFor(m => m.LastName)
-				    @Html.TextBoxFor(m => m.LastName)
-				    @Html.ValidationMessageFor(m => m.LastName)
+

+
Add User

-                    @Html.TextBoxFor(m => m.Image, new { type = "file" })
-		                <input type="submit" value="Add User" />
-                }
+
+

+

+                                @Html.LabelFor(m => m.DisplayName)
+

+

+                                @Html.TextBoxFor(m => m.DisplayName)
+				                @Html.ValidationMessageFor(m => m.DisplayName)
+

+
+

+                                @Html.LabelFor(m => m.FirstName)
+

+

+                                @Html.TextBoxFor(m => m.FirstName)
+				                @Html.ValidationMessageFor(m => m.FirstName)
+

+
+

+                                @Html.LabelFor(m => m.MiddleName)
+

+

+                                @Html.TextBoxFor(m => m.MiddleName)
+				                @Html.ValidationMessageFor(m => m.MiddleName)
+

+
+

+                                @Html.LabelFor(m => m.LastName)
+

+

+                                @Html.TextBoxFor(m => m.LastName)
+				                @Html.ValidationMessageFor(m => m.LastName)
+

+
+

+                                @Html.LabelFor(m => m.Email)
+

+

+                                @Html.TextBoxFor(m => m.Email)
+				                @Html.ValidationMessageFor(m => m.Email)
+

+
+                            @*
+                                @Html.TextBoxFor(m => m.Image, new { type = "file" })
+                            *@
+
+                            @Html.LabelFor(m => m.IsPlayer)
+				            @Html.CheckBoxFor(m => m.IsPlayer)
+				            @Html.ValidationMessageFor(m => m.IsPlayer)
+
+

+
+

+
+

+
Login Information

+

+

+                        @Html.LabelFor(m => m.Username)
+

+

+                        @Html.TextBoxFor(m => m.Username)
+				        @Html.ValidationMessageFor(m => m.Username)
+

+
+

+                        @Html.LabelFor(m => m.Password)
+

+

+                        @Html.TextBoxFor(m => m.Password)
+				        @Html.ValidationMessageFor(m => m.Password)
+

+
+

+                        @Html.LabelFor(m => m.ConfirmPassword)
+

+

+                        @Html.TextBoxFor(m => m.ConfirmPassword)
+				        @Html.ValidationMessageFor(m => m.ConfirmPassword)
+

+

+

+                                    		            <input type="submit" value="Add User" />
+
+          }
+


As part of vetting the fix for Issue #123, make sure Travis CI fails on a real failing test.

--- Keen.NetStandard.Test/QueryTest.cs
+++ Keen.NetStandard.Test/QueryTest.cs
@@ -75,7 +75,7 @@
             }

             var response = await client.GetQueries();
-            Assert.True(response.Any(p => p.Key == "minimum"));
+            Assert.False(response.Any(p => p.Key == "minimum"));
             Assert.True(response.Any(p => p.Key == "average"));
             Assert.True(response.Any(p => p.Key == "maximum"));
             Assert.True(response.Any(p => p.Key == "count_url"));


refactoring, correct exception text and type

--- Langlay.App/Services/SimulatorLanguageSetterService.cs
+++ Langlay.App/Services/SimulatorLanguageSetterService.cs
@@ -63,9 +63,11 @@
                 case WindowsSequenceCode.CtrlShift:
                     SendCtrlShift(amount);
                     break;
+
                 case WindowsSequenceCode.AltShift:
                     SendAltShift(amount);
                     break;
+
                 case WindowsSequenceCode.GraveAccent:
                     SendGraveAccent(amount);
                     break;
@@ -101,7 +103,8 @@
             var result = 0;

             var inputLayouts = InputLayoutHelper.GetInputLayouts();
-            // Re-read the current layout, to find out what layout the system language manager
+
+            // Re-read the current layout, to find out what layout the system language manager
             // has selected within the layout group of the language.
             var currentLayout = InputLayoutHelper.GetCurrentLayout();

@@ -140,8 +143,8 @@
                 if (amountOfLanguageSwitches > 0)
                 {
                     if (CurrentLanguageSwitchSequence == null)
-                        throw new Exception(
-                            "cannot enumerate languages 'cause the system key sequence was not set");
+                        throw new InvalidOperationException(
+                            "Cannot enumerate languages because the system key sequence was not set");

                     SendSequence(CurrentLanguageSwitchSequence.Value, amountOfLanguageSwitches);
                     result = true;
@@ -157,8 +160,8 @@
                 if (amountOfLayoutSwitches > 0)
                 {
                     if (CurrentLayoutSwitchSequence == null)
-                        throw new Exception(
-                            "cannot enumerate layouts, because the system key sequence was not set");
+                        throw new InvalidOperationException(
+                            "Cannot enumerate layouts because the system key sequence was not set");
                     SendSequence(CurrentLayoutSwitchSequence.Value, amountOfLayoutSwitches);
                     result = true;
                 }
@@ -177,4 +180,4 @@
             return result;
         }
     }
-}
+}


ClickableTextComponent position set needed to occur earlier

--- Libraries/FarmhandUI/Generic/ClickableTextComponent.cs
+++ Libraries/FarmhandUI/Generic/ClickableTextComponent.cs
@@ -70,13 +70,13 @@
                 this.Handler += handler;
             }

+            this.position = position;
             this.HoverEffect = hoverEffect;
             this.Font = font;
             this.Color = (Color)color;
             this.Shadow = shadow;
             this.Scale = scale;
             this.Text = text;
-            this.position = position;
         }

         /// <summary>


Fix issue with file names that only differ by name

--- Main/Source/XsdDocumentation/Model/SchemaSetManager.cs
+++ Main/Source/XsdDocumentation/Model/SchemaSetManager.cs
@@ -28,7 +28,7 @@
         {
             var schemaFileNames = Context.Configuration.SchemaFileNames;
             var schemaDependencyFileNames = Context.Configuration.SchemaDependencyFileNames;
-            var allFileNames = schemaFileNames.Union(schemaDependencyFileNames);
+            var allFileNames = schemaFileNames.Union(schemaDependencyFileNames, StringComparer.OrdinalIgnoreCase);

             try
             {


add tests showing that Filter/BiFilter call filter predicate on fail state

--- LanguageExt.Tests/TryMonadTests.cs
+++ LanguageExt.Tests/TryMonadTests.cs
@@ -75,6 +75,60 @@
             Assert.True(res == 0);
         }

+        [Fact]
+        public void TryLinqWhere1()
+        {
+            var res = match(from x in Num(10, true)
+                where x == 10
+                select 5,
+                Succ: toString,
+                Fail: _ => _.GetType().Name);
+
+            Assert.Equal("5", res);
+        }
+
+        [Fact]
+        public void TryLinqWhere2()
+        {
+            var res = match(from x in Num(10, true)
+                where x == 0
+                select 5,
+                Succ: toString,
+                Fail: _ => _.GetType().Name);
+
+            Assert.Equal(nameof(BottomException), res);
+        }
+
+        [Fact]
+        public void TryLinqWhere3()
+        {
+            var res = match(from x in Num(10, false).Strict()
+                where x != 0
+                select 5,
+                Succ: toString,
+                Fail: _ => _.GetType().Name);
+
+            Assert.Equal(nameof(Exception), res);
+        }
+
+        [Fact]
+        public void TryFilter1()
+        {
+            var actual = Try(() => failwith<HttpResponseMessage>("fail"))
+                .Filter(_ => _.IsSuccessStatusCode)
+                .Match(_ => "success", ex => ex.GetType().Name);
+            Assert.Equal(nameof(Exception), actual);
+        }
+
+        [Fact]
+        public void TryBiFilter1()
+        {
+            var actual = Try(() => failwith<HttpResponseMessage>("fail"))
+                .BiFilter(_ => _.IsSuccessStatusCode, ex => true)
+                .Match(_ => "success", ex => ex.GetType().Name);
+            Assert.Equal(nameof(Exception), actual);
+        }
+
         [Fact]
         public void TryMatchSuccessTest1()
         {


Motor speed changes

Motor speed changes

--- LeapEV3/LeapEV3/MainWindow.xaml.cs
+++ LeapEV3/LeapEV3/MainWindow.xaml.cs
@@ -29,9 +29,7 @@
             try
             {
                 _brick = new Brick(new BluetoothCommunication("com6")); //connect to brick using bluetooth at the selected port
-                //_brick = new Brick(new UsbCommunication());
-                //_brick = new Brick(new NetworkCommunication("192.168.2.237"));
-                //_brick.BrickChanged += brick_BrickChanged;
+
                 await _brick.ConnectAsync(); //make connection to brick
                 Output.Text = "Brick Connected"; //output text to screen that connection has taken place
                 controller.EventContext = SynchronizationContext.Current; // used for dispatching events
@@ -45,7 +43,6 @@
             }
         }//Connect_Click

-        // ********************CHANGE BACK TO async void************************************
         async void newFrameHandler(object sender, FrameEventArgs eventArgs)
         {
             Leap.Frame frame = eventArgs.frame;//returns the most recent frame of tracking data
@@ -81,10 +78,7 @@
                 float strength = rightHand.GrabStrength; //get value of grab hand gesture for right hand
                 float roll = rightHand.PalmNormal.Roll; //get roll value of the right hand
                 float leftStrength = leftHand.GrabStrength; //get the value of grab hand gesture of left hand
-                //float pinch = rightHand.PinchStrength; //get value of pinch gesture of right hand
-                //List<Finger> fingerList = rightHand.Fingers;
-                //float fingers = fingerList.Count;
-                float pitch = rightHand.Direction.Pitch; //pitch is the bend in the elbow
+                 float pitch = rightHand.Direction.Pitch; //pitch is the bend in the elbow
                 Output.Text = ("Strength: " + strength.ToString() + " Right Roll: " + roll.ToString() + " Right Pitch: " + pitch);

                 //if right hand is a fist
@@ -151,7 +145,7 @@
         private async Task powerLeftWheel()
         {
             //send direct command to motor C on robot to turn forward at power 80 for 1 second - turns robot right
-            await _brick.DirectCommand.TurnMotorAtPowerForTimeAsync(OutputPort.C, 80, 1000, false);
+            await _brick.DirectCommand.TurnMotorAtPowerForTimeAsync(OutputPort.C, 100, 1000, false);
             //MotorOutput.Text = "powerLeftWheel";
         }

@@ -159,15 +153,15 @@
         private async Task powerRightWheel()
         {
             //send direct command to motor B on robot to turn forward at power 80 for 1 second - turns robot left
-            await _brick.DirectCommand.TurnMotorAtPowerForTimeAsync(OutputPort.B, 80, 1000, false);
+            await _brick.DirectCommand.TurnMotorAtPowerForTimeAsync(OutputPort.B, 100, 1000, false);
             //MotorOutput.Text = "powerRightWheel";
         }

         //send batch command to robot to turn both motors B and C at a power of 50 for 1 second - powers the robot straight forward
         private async Task powerWheels()
         {
-            _brick.BatchCommand.TurnMotorAtPowerForTime(OutputPort.B, 50, 1000, false);
-            _brick.BatchCommand.TurnMotorAtPowerForTime(OutputPort.C, 50, 1000, false);
+            _brick.BatchCommand.TurnMotorAtPowerForTime(OutputPort.B, 80, 1000, false);
+            _brick.BatchCommand.TurnMotorAtPowerForTime(OutputPort.C, 80, 1000, false);
             await _brick.BatchCommand.SendCommandAsync(); //send all batch commands
             //MotorOutput.Text = "powerWheels";
         }
@@ -175,7 +169,7 @@
         private async Task powerLeftWheelReverse()
         {
             //send direct command to motor C on robot to turn in reverse at power -50 for 1 second - robot reverses to the right
-            await _brick.DirectCommand.TurnMotorAtPowerForTimeAsync(OutputPort.C, -50, 1000, false);
+            await _brick.DirectCommand.TurnMotorAtPowerForTimeAsync(OutputPort.C, -100, 1000, false);
             //MotorOutput.Text = "powerLeftWheelReverse";
         }

@@ -183,15 +177,15 @@
         private async Task powerRightWheelReverse()
         {
             //send direct command to motor B on robot to turn in reverse at power -50 for 1 second - robot reverse to the left
-            await _brick.DirectCommand.TurnMotorAtPowerForTimeAsync(OutputPort.B, -50, 1000, false);
+            await _brick.DirectCommand.TurnMotorAtPowerForTimeAsync(OutputPort.B, -100, 1000, false);
             //MotorOutput.Text = "powerRightWheelReverse";
         }

         //send batch command to robot to turn both motors B and C at a power of -50 for 1 second - powers the robot backward in a straight direction
         private async Task powerWheelsReverse()
         {
-            _brick.BatchCommand.TurnMotorAtPowerForTime(OutputPort.B, -50, 1000, false);
-            _brick.BatchCommand.TurnMotorAtPowerForTime(OutputPort.C, -50, 1000, false);
+            _brick.BatchCommand.TurnMotorAtPowerForTime(OutputPort.B, -80, 1000, false);
+            _brick.BatchCommand.TurnMotorAtPowerForTime(OutputPort.C, -80, 1000, false);
             await _brick.BatchCommand.SendCommandAsync();
             //MotorOutput.Text = "powerWheelsReverse";
         }


Better cascade segmentation to ensure good quality for close shadows

Co-authored-by: Daniel <7bc266295eb6c4de1993038d98849494c97a6f57@users.noreply.github.com>

--- OctoAwesome/OctoAwesome.Client/Control/SceneControl.cs
+++ OctoAwesome/OctoAwesome.Client/Control/SceneControl.cs
@@ -96,24 +96,23 @@

         private readonly int _fillIncrement;
         private readonly CancellationTokenSource cancellationTokenSource;
-
+
         public void LoadShader(uint cascades = 2)
         {
             chunkShader?.Dispose();
-            chunkShader = chunkEffectInstantiator.CreateInstance<chunkEffect, chunkEffect.chunkEffectSettings>(new chunkEffect.chunkEffectSettings() { CASCADES = cascades});
-            foreach(var c in chunkRenderer)
+            chunkShader = chunkEffectInstantiator.CreateInstance<chunkEffect, chunkEffect.chunkEffectSettings>(new chunkEffect.chunkEffectSettings() { CASCADES = cascades });
+            foreach (var c in chunkRenderer)
                 c.ReloadShader(chunkShader);
             const int multiply = 1;

             ShadowMaps?.Dispose();
-            ShadowMaps = new Texture2DArray(Manager.GraphicsDevice,1,  8192 * multiply, 8192 * multiply, (int)cascades, PixelInternalFormat.DepthComponent32f);
+            ShadowMaps = new Texture2DArray(Manager.GraphicsDevice, 1, 8192 * multiply, 8192 * multiply, (int)cascades, PixelInternalFormat.DepthComponent32f);
             ShadowMaps.SamplerState = new SamplerState() { AddressU = TextureWrapMode.ClampToEdge, AddressV = TextureWrapMode.ClampToEdge, TextureCompareMode = TextureCompareMode.CompareRefToTexture, TextureCompareFunction = TextureCompareFunc.LessOrEequal };

             _shadowMapsRenderTarget?.Dispose();
             _shadowMapsRenderTarget = new RenderTargetBinding(Array.Empty<RenderTargetBinding.RenderTargetSlice>(), ShadowMaps);
-
-            entities.LoadShader(new entityEffect.entityEffectSettings() { CASCADES = cascades});
-
+
+            entities.LoadShader(new entityEffect.entityEffectSettings() { CASCADES = cascades });
         }
         public SceneControl(ScreenComponent manager, string style = "") :
             base(manager, style)
@@ -276,7 +275,7 @@

             _shadowMapsRenderTarget = null!;
             ShadowMaps = null!;
-            LoadShader((uint)((VIEWRANGE + 1) / 2));
+            LoadShader((uint)Math.Max((VIEWRANGE + 1) / 2, 2));
         }

         protected override void OnDrawContent(SpriteBatch batch, Rectangle contentArea, GameTime gameTime, float alpha)
@@ -558,18 +557,18 @@
         private BoundingBox CreateTransformedAABB(BoundingBox boundingBox, ref Matrix transformation)
         {
             Span<Vector4> corners = stackalloc Vector4[8];
-            corners[0] = new (boundingBox.Min.X, boundingBox.Min.Y, boundingBox.Min.Z, 1.0f);
-            corners[1] = new (boundingBox.Max.X, boundingBox.Min.Y, boundingBox.Min.Z, 1.0f);
-            corners[2] = new (boundingBox.Min.X, boundingBox.Max.Y, boundingBox.Min.Z, 1.0f);
-            corners[3] = new (boundingBox.Max.X, boundingBox.Max.Y, boundingBox.Min.Z, 1.0f);
-            corners[4] = new (boundingBox.Min.X, boundingBox.Min.Y, boundingBox.Max.Z, 1.0f);
-            corners[5] = new (boundingBox.Max.X, boundingBox.Min.Y, boundingBox.Max.Z, 1.0f);
-            corners[6] = new (boundingBox.Min.X, boundingBox.Max.Y, boundingBox.Max.Z, 1.0f);
-            corners[7] = new (boundingBox.Max.X, boundingBox.Max.Y, boundingBox.Max.Z, 1.0f);
+            corners[0] = new(boundingBox.Min.X, boundingBox.Min.Y, boundingBox.Min.Z, 1.0f);
+            corners[1] = new(boundingBox.Max.X, boundingBox.Min.Y, boundingBox.Min.Z, 1.0f);
+            corners[2] = new(boundingBox.Min.X, boundingBox.Max.Y, boundingBox.Min.Z, 1.0f);
+            corners[3] = new(boundingBox.Max.X, boundingBox.Max.Y, boundingBox.Min.Z, 1.0f);
+            corners[4] = new(boundingBox.Min.X, boundingBox.Min.Y, boundingBox.Max.Z, 1.0f);
+            corners[5] = new(boundingBox.Max.X, boundingBox.Min.Y, boundingBox.Max.Z, 1.0f);
+            corners[6] = new(boundingBox.Min.X, boundingBox.Max.Y, boundingBox.Max.Z, 1.0f);
+            corners[7] = new(boundingBox.Max.X, boundingBox.Max.Y, boundingBox.Max.Z, 1.0f);

             Vector3 min = new(float.MaxValue, float.MaxValue, float.MaxValue),
                 max = new(float.MinValue, float.MinValue, float.MinValue);
-            for (int i=0;i<8;i++)
+            for (int i = 0; i < 8; i++)
             {
                 var transformed = Vector4.Transform(transformation, corners[i]);
                 var perspective = new Vector3(transformed.X / transformed.W, transformed.Y / transformed.W, transformed.Z / transformed.W);
@@ -604,24 +603,30 @@
         {
             var lightViewProjMatrix = LightViewProjMatrix(light, lightDir, casters, receivers, out var receiverBB, out var casterBB);

-
             int dirRange = (1 << VIEWRANGE) * Chunk.CHUNKSIZE_X / 2;
             float farPlane = MathF.Sqrt(dirRange * dirRange * 2) + player.Position.Position.GlobalPosition.Z;
             float nearPlane = camera.NearPlaneDistance;
-
+
             float dist = (farPlane - nearPlane);

-            float correction = 0.9f;
-
             int cropMatrixCount = ShadowMaps.LayerCount;

-            float invCascades = 1.0f / cropMatrixCount;
+            float invCascades = 1.0f / (cropMatrixCount - 1);
             float previousCascadeDepth = nearPlane;
-
+
+            static float CalcCascade(int i, float nearPlane, float farPlane, float invCascades)
+            {
+                float dist = (farPlane - nearPlane);
+
+                float correction = 0.9f;
+                return correction * nearPlane * MathF.Pow((farPlane / nearPlane), (i + 1) * invCascades)
+                                     + (1 - correction) * (nearPlane + ((i + 1) * invCascades) * dist);
+            }
+
+            float cascadeDepth = 17;
+
             for (int i = 0; i < cropMatrixCount; i++)
             {
-                float cascadeDepth = correction * nearPlane * MathF.Pow((farPlane / nearPlane), (i + 1) * invCascades)
-                                     + (1 - correction) * (nearPlane + ((i + 1) * invCascades) * dist);
                 //float cascadeDepth = nearPlane + (i + 1) * dist;
                 var splitProjection = Matrix.CreatePerspectiveFieldOfView(
                     MathHelper.PiOver4, Manager.GraphicsDevice.Viewport.AspectRatio, previousCascadeDepth, cascadeDepth);
@@ -636,7 +641,7 @@

                 cropBB.Min.Y = Math.Max(Math.Max(casterBB.Min.Y, receiverBB.Min.Y), splitBB.Min.Y);
                 cropBB.Max.Y = Math.Min(Math.Min(casterBB.Max.Y, receiverBB.Max.Y), splitBB.Max.Y);
-
+
                 cropBB.Min.Z = Math.Min(casterBB.Min.Z, splitBB.Min.Z);
                 cropBB.Max.Z = Math.Max(receiverBB.Max.Z, splitBB.Max.Z);

@@ -645,8 +650,10 @@
                 chunkShader.Ambient.CropMatrices[i] = cropMatrix;
                 chunkShader.Ambient.CascadeDepth[i] = cascadeDepth;
                 chunkShader.Shadow.CropMatrices[i] = cropMatrix;
-
+
                 entities.ApplyCropMatrix(i, cascadeDepth, cropMatrix);
+
+                cascadeDepth = CalcCascade(i, 17, farPlane, invCascades);
             }
         }

@@ -681,7 +688,7 @@
             casters.Clear();
             int viewDistChunks = (1 << VIEWRANGE) / 2 - 1;
             var chunkSize = new Vector3(Chunk.CHUNKSIZE_X, Chunk.CHUNKSIZE_Y, Chunk.CHUNKSIZE_Z);
-
+
             for (int z = 0; z < planet.Size.Z; z++)
             {
                 for (int y = -viewDistChunks; y <= viewDistChunks; y++)
@@ -700,7 +707,7 @@
                 }
             }

-            foreach(var e in entities.Entities)
+            foreach (var e in entities.Entities)
             {
                 var p = e.Components.GetComponent<PositionComponent>();
                 var offset = p.Position.ChunkIndex.ShortestDistanceXY(chunkOffset, new Index2(planet.Size));
@@ -742,7 +749,6 @@
             DrawSelectionBox(chunkOffset);

 #if DEBUG
-
             var world = Matrix.Identity;
             foreach (var bb in _casters)
             {
@@ -807,7 +813,6 @@

         private void DrawSun(GameTime gameTime, Index3 chunkOffset, Vector3 sunDirection)
         {
-
             Manager.GraphicsDevice.RasterizerState = RasterizerState.CullNone;

             sunEffect.CurrentTechnique.Passes[0].Apply();


Bug: Fixed New Pokemon Default Level 0 the experience chart kept returning 0 as default value... but it's actually supposed to be 1, so i had to increase the default by one, and then calculate math with a -1 to everything else.


sd løn

sd løn

--- Presentation.Web/Controllers/DriveReportsController.cs
+++ Presentation.Web/Controllers/DriveReportsController.cs
@@ -185,11 +185,14 @@
                 report.Status = ReportStatus.Rejected;
                 report.Comment = emailText;
                 report.ClosedDateTimestamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
-                try {
+                try
+                {
                     Repo.Save();
                     _driveService.SendMailToUserAndApproverOfEditedReport(report, emailText, CurrentUser, "afvist");
                     return Ok();
-                } catch (Exception e) {
+                }
+                catch (Exception e)
+                {
                     _logger.Log("Fejl under forsøg på at afvise en allerede godkendt indberetning. Rapportens status er ikke ændret.", "web", e, 3);
                 }
             }
@@ -299,14 +302,16 @@
                 {
                     person = persons.First(x => x.Id == t.PersonId);
                 }
-                catch (Exception E) {
+                catch (Exception E)
+                {
                 }

                 double koerselDato = t.DriveDateTimestamp;
                 System.DateTime KoerseldateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
                 KoerseldateTime = KoerseldateTime.AddSeconds(koerselDato);

-                if (person != null) {
+                if (person != null)
+                {
                     result.Add(
                         new Models.InddataStruktur
                         {
@@ -324,7 +329,8 @@
                 }
             }

-            foreach (var v in result) {
+            foreach (var v in result)
+            {
                 xmlResult +=
                     "<m:InddataStruktur xmlns:m=\"urn:oio:sd:snitflader:2012.02.01\">" +
                     "<m:InstitutionIdentifikator>" + v.InstitutionIdentifikator + "</m:InstitutionIdentifikator>" +
@@ -348,7 +354,8 @@
             {
                 soapEnvelop.LoadXml(@"<SOAP-ENV:Envelope xmlns:SOAP-ENV=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:SOAP-ENC=""http://schemas.xmlsoap.org/soap/encoding/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""><SOAP-ENV:Body>" + xmlResult + "</SOAP-ENV:Body></SOAP-ENV:Envelope>");
             }
-            catch (Exception e) {
+            catch (Exception e)
+            {

             }
             return soapEnvelop;
@@ -362,14 +369,15 @@
             }
         }

-    private HttpWebRequest CreateWebRequest(string url, string action)
-    {
-        HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
-        webRequest.Headers.Add("SOAPAction", action);
-        webRequest.ContentType = "text/xml;charset=\"utf-8\"";
-        webRequest.Accept = "text/xml";
-        webRequest.Method = "POST";
-        return webRequest;
+        private HttpWebRequest CreateWebRequest(string url, string action)
+        {
+            HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
+            webRequest.Headers.Add("SOAPAction", action);
+            webRequest.ContentType = "text/xml;charset=\"utf-8\"";
+            webRequest.Accept = "text/xml";
+            webRequest.Method = "POST";
+            return webRequest;
+        }
+
     }
-
 }


Clarifies image indexes

Clarifies image indexes

--- Product/SharedProject/Navigation/ProjectLibraryNode.cs
+++ Product/SharedProject/Navigation/ProjectLibraryNode.cs
@@ -38,6 +38,7 @@
             get {
                 var res = new VSTREEDISPLAYDATA();
 #if DEV14_OR_LATER
+                // Use the default Reference icon for projects
                 res.hImageList = IntPtr.Zero;
                 res.Image = res.SelectedImage = 192;
 #else


Fixed trace file formating

Fixed trace file formating

--- QuickLogViewer/Components/CsharpStacktraceFormatter.cs
+++ QuickLogViewer/Components/CsharpStacktraceFormatter.cs
@@ -11,8 +11,8 @@
     {
         private static readonly Rtf _rtf = new Rtf();
         private static readonly Regex _exceptionName = new Regex(@"(System\.(\w|\.)+Exception:?)", RegexOptions.Compiled);
-        private static readonly Regex _stackTraceMethodLine = new Regex(@"\s+(at\s+" + MethodCharacters + @")\s+", RegexOptions.Compiled);
-        private static readonly Regex _stackTraceFileLine = new Regex(@"\s+(in\s+" + PathCharacters + @"\.cs:line\s+\d+)", RegexOptions.Compiled);
+        private static readonly Regex _stackTraceMethodLine = new Regex(@"\s*(at\s+" + MethodCharacters + @")\s+", RegexOptions.Compiled);
+        private static readonly Regex _stackTraceFileLine = new Regex(@"\s*(in\s+" + PathCharacters + @"\.cs:line\s+\d+)", RegexOptions.Compiled);
         private static readonly Regex _exceptionMessage = new Regex(@"Exception:", RegexOptions.Compiled);

         const string PathCharacters = @"[\w|\.|\\|:|\s|_]+";
@@ -34,8 +34,8 @@
         {
             text = _exceptionMessage.Replace(text, match => match.Groups[0].Value + Rtf.NewLine + Rtf.Red);
             text = _exceptionName.Replace(text, match => Rtf.NewLine + Rtf.NewLine + _rtf.Bold(match.Groups[0].Value) + Rtf.NewLine);
-            text = _stackTraceMethodLine.Replace(text, match => Rtf.NewLine + Rtf.Gray + match.Groups[0].Value);
-            text = _stackTraceFileLine.Replace(text, match => Rtf.NewLine + Rtf.Gray + match.Groups[0].Value);
+            text = _stackTraceMethodLine.Replace(text, match => Rtf.NewLine + Rtf.Gray + match.Groups[1].Value);
+            text = _stackTraceFileLine.Replace(text, match => Rtf.NewLine + "  " + Rtf.Gray + match.Groups[1].Value);
             return text;
         }


添加 Sample 示例代码

添加 Sample 示例代码

--- Samples/net6-mvc/Senparc.Weixin.Sample.Net6/Startup.cs
+++ Samples/net6-mvc/Senparc.Weixin.Sample.Net6/Startup.cs
@@ -381,6 +381,9 @@
                 //对 MessageHandler 内异步方法未提供重写时，调用同步方法（按需）
                 options.DefaultMessageHandlerAsyncEvent = DefaultMessageHandlerAsyncEvent.SelfSynicMethod;

+                options.EnableRequestLog = true;//默认就为 true，如需关闭日志，可设置为 false
+                options.EnbleResponseLog = true;//默认就为 true，如需关闭日志，可设置为 false
+
                 //对发生异常进行处理（可选）
                 options.AggregateExceptionCatch = ex =>
                 {
@@ -400,7 +403,7 @@
             //使用 企业微信 MessageHandler 中间件                                                 // -- DPBMARK Work
             app.UseMessageHandlerForWork("/WorkAsync", WorkCustomMessageHandler.GenerateMessageHandler,
                                          o => o.AccountSettingFunc = c => senparcWeixinSetting.Value);//最简化的方式
-                                                                                // DPBMARK_END
+                                                                                // DPBMARK_END

             #endregion


Nicer message in tests

Nicer message in tests

--- Source/EasyNetQ.Tests/Integration/PolymorphicPubSub.cs
+++ Source/EasyNetQ.Tests/Integration/PolymorphicPubSub.cs
@@ -64,7 +64,7 @@
                     }
                     else
                     {
-                        Console.Out.WriteLine("message was null");
+                        Console.Out.WriteLine("message was not a dog or a cat");
                     }
                 });


GSF.Core: Added support in the Logger to override the SuppressLogMessages flag.

--- Source/Libraries/GSF.Core.Shared/Diagnostics/Logger.cs
+++ Source/Libraries/GSF.Core.Shared/Diagnostics/Logger.cs
@@ -23,7 +23,6 @@
 //******************************************************************************************************

 using System;
-using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Security;
 using System.Security.Permissions;
@@ -37,6 +36,61 @@
     /// </summary>
     public static class Logger
     {
+        private class ThreadStack
+        {
+            private List<LogStackMessages> m_threadStackDetails = new List<LogStackMessages>();
+            private LogStackMessages m_stackMessageCache;
+            private List<bool> m_logMessageSuppressionStack = new List<bool>();
+
+            public bool ShouldSuppressLogMessages => m_logMessageSuppressionStack.Count > 0 && m_logMessageSuppressionStack[m_logMessageSuppressionStack.Count - 1];
+
+            public LogStackMessages GetStackMessages()
+            {
+                if (m_stackMessageCache == null)
+                {
+                    if (m_threadStackDetails.Count == 0)
+                    {
+                        m_stackMessageCache = LogStackMessages.Empty;
+                    }
+                    else
+                    {
+                        m_stackMessageCache = new LogStackMessages(m_threadStackDetails);
+                    }
+                }
+                return m_stackMessageCache;
+            }
+
+            public StackDetailsDisposal AppendStackMessages(LogStackMessages messages)
+            {
+                m_stackMessageCache = null;
+                m_threadStackDetails.Add(messages);
+                return new StackDetailsDisposal(m_threadStackDetails.Count);
+            }
+
+            public SuppressLogMessagesDisposal SuppressLogMessages(bool shouldSuppress)
+            {
+                m_logMessageSuppressionStack.Add(shouldSuppress);
+                return new SuppressLogMessagesDisposal(m_logMessageSuppressionStack.Count);
+            }
+
+            public void RemoveStackMessage(StackDetailsDisposal depth)
+            {
+                while (m_threadStackDetails.Count >= depth.Depth)
+                {
+                    m_threadStackDetails.RemoveAt(m_threadStackDetails.Count - 1);
+                }
+                m_stackMessageCache = null;
+            }
+
+            public void RemoveSuppression(SuppressLogMessagesDisposal depth)
+            {
+                while (m_logMessageSuppressionStack.Count >= depth.Depth)
+                {
+                    m_logMessageSuppressionStack.RemoveAt(m_logMessageSuppressionStack.Count - 1);
+                }
+            }
+        }
+
         private static LoggerInternal s_logger;

         /// <summary>
@@ -50,8 +104,7 @@
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
         public static readonly LogSubscriptionFileWriter FileWriter;

-        private static readonly ConcurrentDictionary<int, int> LogSuppressionChecking = new ConcurrentDictionary<int, int>();
-        private static readonly Dictionary<int, List<LogStackMessages>> ThreadStackDetails = new Dictionary<int, List<LogStackMessages>>();
+        private static readonly ThreadLocal<ThreadStack> ThreadItems = new ThreadLocal<ThreadStack>(() => new ThreadStack());

         private static readonly LogPublisher Log;
         private static readonly LogEventPublisher EventFirstChanceException;
@@ -81,7 +134,7 @@
         /// <summary>
         /// Gets if Log Messages should be suppressed.
         /// </summary>
-        public static bool ShouldSuppressLogMessages => LogSuppressionChecking.ContainsKey(Thread.CurrentThread.ManagedThreadId);
+        public static bool ShouldSuppressLogMessages => ThreadItems.Value.ShouldSuppressLogMessages;

         /// <summary>
         /// Ensures that the logger has been initialized.
@@ -184,19 +237,7 @@
         /// <returns></returns>
         public static LogStackMessages GetStackMessages()
         {
-            int threadid = Thread.CurrentThread.ManagedThreadId;
-
-            List<LogStackMessages> stack;
-
-            lock (ThreadStackDetails)
-            {
-                if (!ThreadStackDetails.TryGetValue(threadid, out stack))
-                {
-                    return LogStackMessages.Empty;
-                }
-            }
-
-            return new LogStackMessages(stack);
+            return ThreadItems.Value.GetStackMessages();
         }

@@ -208,21 +249,7 @@
         /// <returns></returns>
         public static StackDetailsDisposal AppendStackMessages(LogStackMessages messages)
         {
-            int threadid = Thread.CurrentThread.ManagedThreadId;
-
-            List<LogStackMessages> stack;
-
-            lock (ThreadStackDetails)
-            {
-                if (!ThreadStackDetails.TryGetValue(threadid, out stack))
-                {
-                    stack = new List<LogStackMessages>();
-                    ThreadStackDetails.Add(threadid, stack);
-                }
-            }
-
-            stack.Add(messages);
-            return new StackDetailsDisposal(stack.Count);
+            return ThreadItems.Value.AppendStackMessages(messages);
         }

         /// <summary>
@@ -232,7 +259,17 @@
         /// <returns></returns>
         public static SuppressLogMessagesDisposal SuppressLogMessages()
         {
-            return new SuppressLogMessagesDisposal(LogSuppressionChecking.TryAdd(Thread.CurrentThread.ManagedThreadId, 1));
+            return ThreadItems.Value.SuppressLogMessages(true);
+        }
+
+        /// <summary>
+        /// Sets a flag that will allow log messages to be raised again.
+        /// Remember to dispose of the callback to remove this override.
+        /// </summary>
+        /// <returns></returns>
+        public static SuppressLogMessagesDisposal OverrideSuppressLogMessages()
+        {
+            return ThreadItems.Value.SuppressLogMessages(false);
         }

         /// <summary>
@@ -273,29 +310,7 @@
             {
                 if (Depth == 0)
                     return;
-                int threadid = Thread.CurrentThread.ManagedThreadId;
-
-                if (Depth == 1)
-                {
-                    lock (ThreadStackDetails)
-                    {
-                        ThreadStackDetails.Remove(threadid);
-                    }
-                }
-                else
-                {
-                    lock (ThreadStackDetails)
-                    {
-                        List<LogStackMessages> stack;
-                        if (ThreadStackDetails.TryGetValue(threadid, out stack))
-                        {
-                            while (stack.Count >= Depth)
-                            {
-                                stack.RemoveAt(stack.Count - 1);
-                            }
-                        }
-                    }
-                }
+                ThreadItems.Value.RemoveStackMessage(this);
                 Depth = 0;
             }
         }
@@ -306,11 +321,11 @@
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
         public struct SuppressLogMessagesDisposal : IDisposable
         {
-            internal bool ShouldRemove { get; private set; }
-
-            internal SuppressLogMessagesDisposal(bool shouldRemove)
-            {
-                ShouldRemove = shouldRemove;
+            internal int Depth { get; private set; }
+
+            internal SuppressLogMessagesDisposal(int depth)
+            {
+                Depth = depth;
             }

             /// <summary>
@@ -319,13 +334,10 @@
             /// <filterpriority>2</filterpriority>
             public void Dispose()
             {
-                if (ShouldRemove)
-                {
-                    int threadid = Thread.CurrentThread.ManagedThreadId;
-                    int value;
-                    LogSuppressionChecking.TryRemove(threadid, out value);
-                    ShouldRemove = false;
-                }
+                if (Depth == 0)
+                    return;
+                ThreadItems.Value.RemoveSuppression(this);
+                Depth = 0;
             }
         }
     }


GSF.Web: Updated shared Companies view to allow selection of a company as the configured company / acronym for the current service

--- Source/Libraries/GSF.Web/Shared/Views/Companies.cshtml
+++ Source/Libraries/GSF.Web/Shared/Views/Companies.cshtml
@@ -20,6 +20,11 @@
 //       Generated original version of source code.
 //
 //*****************************************************************************************************@
+@using System.Net.Http
+@using GSF.Configuration
+@using GSF.Data.Model
+@using GSF.Security
+@using GSF.Web
 @using GSF.Web.Model
 @using GSF.Web.Shared
 @using GSF.Web.Shared.Model
@@ -32,25 +37,81 @@
     </style>
 }
 @{
+    HttpRequestMessage request = ViewBag.Request;
     DataContext dataContext = ViewBag.DataContext;
+    bool userIsAdmin = UserIsAdmin();

     ViewBag.Title = "Companies";
     ViewBag.ShowSearchFilter = true;

+    Layout = "Layout.cshtml";
+
+    CategorizedSettingsSection configurationSettings = ConfigurationFile.Current.Settings;
+    CategorizedSettingsElement setting;
+
+    CategorizedSettingsElementCollection systemSettings = configurationSettings["systemSettings"];
+    setting = systemSettings["CompanyAcronym"];
+    string companyAcronym = setting == null || string.IsNullOrWhiteSpace(setting.Value) ? "GPA" : setting.Value;
+
+    CategorizedSettingsElementCollection securityProvider = configurationSettings["securityProvider"];
+    setting = securityProvider["ApplicationName"];
+    string applicationName = setting == null || string.IsNullOrWhiteSpace(setting.Value) ? "TSF Service" : setting.Value;
+
+    if (ViewBag.IsPost && userIsAdmin)
+    {
+        PostData postData = request.GetPostData();
+        string selectedCompanyID = postData.FormData["selectedCompanyID"];
+        int companyID;
+
+        if (int.TryParse(selectedCompanyID, out companyID))
+        {
+            TableOperations<Company> companyTable = dataContext.Table<Company>();
+            Company company = companyTable.QueryRecordWhere("ID = {0}", companyID);
+
+            if (company != null)
+            {
+                systemSettings["CompanyName"].Value = company.Name;
+                systemSettings["CompanyAcronym"].Value = company.Acronym;
+
+                if (ViewBag.Model != null && ViewBag.Model.Global != null)
+                {
+                    ViewBag.Model.Global.CompanyName = company.Name;
+                    ViewBag.Model.Global.CompanyAcronym = company.Acronym;
+                }
+
+                companyAcronym = company.Acronym;
+                ConfigurationFile.Current.Save();
+            }
+        }
+    }
+
     ViewBag.HeaderColumns = new[]
-{   //    { "Field", "Label", "Classes" }
+    {   //    { "Field", "Label", "Classes" }
         new[] { "Acronym", "Acronym", "text-left" },
         new[] { "Name", "Name", "text-left" },
+        new[] { null, "Configured
Company", "text-center valign-middle" },
         new[] { "URL", "URL", "text-left" }
     };

-    ViewBag.BodyRows = BodyRows().ToString();
+    ViewBag.BodyRows = BodyRows(applicationName, userIsAdmin.ToString().ToLower()).ToString();
     ViewBag.AddNewEditDialog = AddNewEditDialog(dataContext).ToString();
 }
-@helper BodyRows()
+@functions {
+    public bool UserIsAdmin()
+    {
+        SecurityPrincipal securityPrincipal = ViewBag.SecurityPrincipal as SecurityPrincipal;
+
+        if ((object)securityPrincipal == null)
+            return false;
+
+        return securityPrincipal.IsInRole("Administrator");
+    }
+}
+@helper BodyRows(string applicationName, string userIsAdmin)
 {
     <button type="button" class="btn btn-link btn-xs" data-bind="text: Acronym, click: $parent.viewPageRecord"></button>

+    <button type="button" class="btn btn-sm btn-default" data-bind="visible: @userIsAdmin || isCurrentInstance($data), click: selectCompany.bind($data), enable: @userIsAdmin && $parent.dataHubIsConnected, style: { borderWidth: isCurrentInstance($data) ? '3px' : 'inherit', borderColor: isCurrentInstance($data) ? 'green' : 'inherit' }, attr: { title: 'Select \'' + $data.Name + '\' as the configured company for this \'@applicationName\' instance' }">SelectCurrent </button>

         <button type="button" class="btn btn-xs" data-bind="click: $parent.editPageRecord, enable: $parent.dataHubIsConnected"></button>
@@ -66,12 +127,28 @@
     @Raw(dataContext.AddInputField<Company>("LoadOrder", "number", "Load Order"))
 }
 @Html.RenderResource("GSF.Web.Model.Views.PagedViewModel.cshtml")
+@if (userIsAdmin) {
+<form id="selectCompany" role="form" method="post">
+    <input name="selectedCompanyID" type="hidden" value="0">
+    @Html.RequestVerificationToken()
+</form>
+}
 @section Scripts {

-}
-@{
+}@{
     ViewBag.StyleSheetsSection = RenderSection("StyleSheets").ToString();
     ViewBag.ScriptsSection = RenderSection("Scripts").ToString();
-}
+}


Fixing AddIndexOpertion tests to work with new include clause.

--- Source/Test/Operations/AddIndexOperationTestFixture.cs
+++ Source/Test/Operations/AddIndexOperationTestFixture.cs
@@ -152,7 +152,7 @@
             var include = new[] { "include1", "include2" };

 			var op = new AddIndexOperation(schemaName, tableName, columnName, descending, unique, clustered, options, whereString, onString, filestreamonString, include);
-			const string expectedQuery = "create unique clustered index [UIX_schemaName_tableName_column1_column2] on [schemaName].[tableName] ([column1] desc, [column2]) with ( option1, option2 ) where ( whereString ) on onString filestream_on filestreamonString";
+			const string expectedQuery = "create unique clustered index [UIX_schemaName_tableName_column1_column2] on [schemaName].[tableName] ([column1] desc, [column2]) include ( [include1], [include2] ) with ( option1, option2 ) where ( whereString ) on onString filestream_on filestreamonString";

 			Assert.AreEqual(expectedQuery, op.ToQuery());
 		}
@@ -174,7 +174,7 @@
             var include = new[] { "include1", "include2" };

 			var op = new AddIndexOperation(schemaName, tableName, columnName, optionalConstraintName, descending, unique, clustered, options, whereString, onString, filestreamonString, include);
-			const string expectedQuery = "create unique clustered index [optionalConstraintName] on [schemaName].[tableName] ([column1] desc, [column2]) with ( option1, option2 ) where ( whereString ) on onString filestream_on filestreamonString";
+			const string expectedQuery = "create unique clustered index [optionalConstraintName] on [schemaName].[tableName] ([column1] desc, [column2]) include ( [include1], [include2] ) with ( option1, option2 ) where ( whereString ) on onString filestream_on filestreamonString";

 			Assert.AreEqual(expectedQuery, op.ToQuery());
 		}


[Toolkit.Graphics] Fix compiling error typo in SpriteBatch

--- Source/Toolkit/SharpDX.Toolkit.Graphics/SpriteBatch.cs
+++ Source/Toolkit/SharpDX.Toolkit.Graphics/SpriteBatch.cs
@@ -850,7 +850,7 @@
                 {
                     if (x64TempBuffer == null)
                     {
-                        x64TempBuffer = ToDispose(new DataBuffer(Utilities.SizeOf<VertexPositionColorTexture>() * MaxBatchSize * VerticesPerSprite)));
+                        x64TempBuffer = ToDispose(new DataBuffer(Utilities.SizeOf<VertexPositionColorTexture>() * MaxBatchSize * VerticesPerSprite));
                     }

                     // Perform the update of all vertices on a temporary buffer


Remove ClaimTransaction  for IsLowPriority

Is not necessary because according to https://github.com/neo-project/neo-plugins/issues/33#issuecomment-445194586 we can check that for `ClaimTransaction` is not possible to assign fee.

--- neo/Network/P2P/Payloads/Transaction.cs
+++ neo/Network/P2P/Payloads/Transaction.cs
@@ -49,7 +49,7 @@

         InventoryType IInventory.InventoryType => InventoryType.TX;

-        public bool IsLowPriority => Type == TransactionType.ClaimTransaction || NetworkFee < Settings.Default.LowPriorityThreshold;
+        public bool IsLowPriority => NetworkFee < Settings.Default.LowPriorityThreshold;

         private Fixed8 _network_fee = -Fixed8.Satoshi;
         public virtual Fixed8 NetworkFee


data matrix writer test cases

data matrix writer test cases

--- Source/test/src/datamatrix/DataMatrixWriterTestCase.cs
+++ Source/test/src/datamatrix/DataMatrixWriterTestCase.cs
@@ -18,7 +18,7 @@
 using System.Collections.Generic;

 using NUnit.Framework;
-
+using ZXing.Common;
 using ZXing.Datamatrix.Encoder;

 namespace ZXing.Datamatrix.Test
@@ -78,7 +78,7 @@
       [Test]
       public void Should_Encode_FNC1()
       {
-         var content = $"{(char) 29}abcdefg{(char) 29}1223456";
+         var content = String.Format("{0}abcdefg{0}1223456", (char)29);

          var writer = new DataMatrixWriter();

@@ -97,5 +97,71 @@
          Assert.That(result, Is.Not.Null);
          Assert.That(result.Text, Is.EqualTo(content));
       }
+
+      [TestCase("Abc123!", SymbolShapeHint.FORCE_SQUARE)]
+      [TestCase("Lorem ipsum. http://test/", SymbolShapeHint.FORCE_SQUARE)]
+      [TestCase("AAAANAAAANAAAANAAAANAAAANAAAANAAAANAAAANAAAANAAAAN", SymbolShapeHint.FORCE_SQUARE)]
+      [TestCase("http://test/~!@#*^%&)__ ;:'\"[]{}\\|-+-=`1029384", SymbolShapeHint.FORCE_SQUARE)]
+      [TestCase(@"http://test/~!@#*^%&)__ ;:'\""[]{}\\|-+-=`1029384756<>/?abc
+Four score and seven our forefathers brought forth", SymbolShapeHint.FORCE_SQUARE)]
+      [TestCase(@"In ut magna vel mauris malesuada dictum. Nulla ullamcorper metus quis diam
+ cursus facilisis. Sed mollis quam id justo rutrum sagittis. Donec laoreet rutrum
+ est, nec convallis mauris condimentum sit amet. Phasellus gravida, justo et congue
+ auctor, nisi ipsum viverra erat, eget hendrerit felis turpis nec lorem. Nulla
+ ultrices, elit pellentesque aliquet laoreet, justo erat pulvinar nisi, id
+ elementum sapien dolor et diam.", SymbolShapeHint.FORCE_SQUARE)]
+      [TestCase(@"In ut magna vel mauris malesuada dictum. Nulla ullamcorper metus quis diam
+ cursus facilisis. Sed mollis quam id justo rutrum sagittis. Donec laoreet rutrum
+ est, nec convallis mauris condimentum sit amet. Phasellus gravida, justo et congue
+ auctor, nisi ipsum viverra erat, eget hendrerit felis turpis nec lorem. Nulla
+ ultrices, elit pellentesque aliquet laoreet, justo erat pulvinar nisi, id
+ elementum sapien dolor et diam. Donec ac nunc sodales elit placerat eleifend.
+ Sed ornare luctus ornare. Vestibulum vehicula, massa at pharetra fringilla, risus
+ justo faucibus erat, nec porttitor nibh tellus sed est. Ut justo diam, lobortis eu
+ tristique ac, p.In ut magna vel mauris malesuada dictum. Nulla ullamcorper metus
+ quis diam cursus facilisis. Sed mollis quam id justo rutrum sagittis. Donec
+ laoreet rutrum est, nec convallis mauris condimentum sit amet. Phasellus gravida,
+ justo et congue auctor, nisi ipsum viverra erat, eget hendrerit felis turpis nec
+ lorem. Nulla ultrices, elit pellentesque aliquet laoreet, justo erat pulvinar
+ nisi, id elementum sapien dolor et diam. Donec ac nunc sodales elit placerat
+ eleifend. Sed ornare luctus ornare. Vestibulum vehicula, massa at pharetra
+ fringilla, risus justo faucibus erat, nec porttitor nibh tellus sed est. Ut justo
+ diam, lobortis eu tristique ac, p. In ut magna vel mauris malesuada dictum. Nulla
+ ullamcorper metus quis diam cursus facilisis. Sed mollis quam id justo rutrum
+ sagittis. Donec laoreet rutrum est, nec convallis mauris condimentum sit amet.
+ Phasellus gravida, justo et congue auctor, nisi ipsum viverra erat, eget hendrerit
+ felis turpis nec lorem. Nulla ultrices, elit pellentesque aliquet laoreet, justo
+ erat pulvinar nisi, id elementum sapien dolor et diam.", SymbolShapeHint.FORCE_SQUARE)]
+
+      [TestCase("Abc123!", SymbolShapeHint.FORCE_RECTANGLE)]
+      [TestCase("Lorem ipsum. http://test/", SymbolShapeHint.FORCE_RECTANGLE)]
+      [TestCase("3i0QnD^RcZO[\\#!]1,9zIJ{1z3qrvsq", SymbolShapeHint.FORCE_RECTANGLE)]
+      [TestCase("AAAANAAAANAAAANAAAANAAAANAAAANAAAANAAAANAAAANAAAAN", SymbolShapeHint.FORCE_RECTANGLE)]
+      [TestCase("http://test/~!@#*^%&)__ ;:'\"[]{}\\|-+-=`1029384", SymbolShapeHint.FORCE_RECTANGLE)]
+      [TestCase("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", SymbolShapeHint.FORCE_RECTANGLE)]
+
+      // EDIFACT, TODO: force EDIFACT
+      [TestCase("https://test~[******]_", SymbolShapeHint.FORCE_NONE)]
+      [TestCase("abc<->ABCDE", SymbolShapeHint.FORCE_NONE)]
+      [TestCase("<ABCDEFG><ABCDEFGK>", SymbolShapeHint.FORCE_NONE)]
+      [TestCase("*CH/GN1/022/00", SymbolShapeHint.FORCE_NONE)]
+
+      [TestCase("MEMANT-1F-MESTECH", SymbolShapeHint.FORCE_NONE)]
+      [TestCase("MEMANT -1F-M-2estech", SymbolShapeHint.FORCE_NONE)]
+      [TestCase("MEMANT -1F-M-2e-stech", SymbolShapeHint.FORCE_NONE)]
+      [TestCase("MEMANT -1F-M6ABCDEF", SymbolShapeHint.FORCE_NONE)]
+      public void TestEncodeDecode(String data, SymbolShapeHint shape)
+      {
+         var writer = new DataMatrixWriter();
+         var options = new DatamatrixEncodingOptions {SymbolShape = shape};
+         var matrix = writer.encode(data, BarcodeFormat.DATA_MATRIX, 0, 0, options.Hints);
+
+         Assert.That(matrix, Is.Not.Null);
+
+         var res = new Internal.Decoder().decode(matrix);
+
+         Assert.That(res, Is.Not.Null);
+         Assert.That(res.Text, Is.EqualTo(data));
+      }
    }
 }


fixed according to pr comments

fixed according to pr comments

--- Mage/CommandCenter/CommandBatch.cs
+++ Mage/CommandCenter/CommandBatch.cs
@@ -6,7 +6,7 @@

 public class CommandBatch {
 	public int queryId;
-	public List<Dictionary<String, String>> batchHeaders = new List<Dictionary<String, String>>();
+	public List<Dictionary<string, string>> batchHeaders = new List<Dictionary<string, string>>();
 	public List<CommandBatchItem> batchItems = new List<CommandBatchItem>();

 	public object serialisedCache;


Fix a bug with updating the sizeX and sizeY row.

--- OpenSim/Services/Interfaces/IGridService.cs
+++ OpenSim/Services/Interfaces/IGridService.cs
@@ -380,8 +380,8 @@
             kvp["owner_uuid"] = EstateOwner.ToString();
             kvp["Maturity"] = Maturity.ToString();
             kvp["Token"] = Token.ToString();
-            kvp["sizex"] = RegionSizeX.ToString();
-            kvp["sizey"] = RegionSizeY.ToString();
+            kvp["sizeX"] = RegionSizeX.ToString();
+            kvp["sizeY"] = RegionSizeY.ToString();
             return kvp;
         }

@@ -450,12 +450,11 @@
             if (kvp.ContainsKey("Token"))
                 Token = kvp["Token"].ToString();

-            if (kvp.ContainsKey("sizex"))
-                m_RegionSizeX = float.Parse(kvp["sizex"].ToString());
-
-            if (kvp.ContainsKey("sizey"))
-                m_RegionSizeY = float.Parse(RegionSizeY.ToString());
+            if (kvp.ContainsKey("sizeX"))
+                m_RegionSizeX = float.Parse(kvp["sizeX"].ToString());
+
+            if (kvp.ContainsKey("sizeY"))
+                m_RegionSizeY = float.Parse(kvp["sizeY"].ToString());
         }
     }
-
 }


Fix for GetFeaturesInView with null BoundingBox

Some features can have not null Geometry but calculated BoundingBox was
null (Polygon empty is one of such examples).

--- Mapsui/Providers/MemoryProvider.cs
+++ Mapsui/Providers/MemoryProvider.cs
@@ -158,6 +158,8 @@

         public virtual IEnumerable<IFeature> GetFeaturesInView(BoundingBox box, double resolution)
         {
+            if (box == null) throw new ArgumentNullException("box");
+
             lock (_syncRoot)
             {
                 var features = Features.ToList();
@@ -170,7 +172,8 @@
                     if (feature.Geometry == null)
                         continue;

-                    if (grownBox.Intersects(feature.Geometry.GetBoundingBox()))
+                    var boundingBox = feature.Geometry.GetBoundingBox();
+                    if (boundingBox!= null && grownBox.Intersects(boundingBox))
                     {
                         yield return feature;
                     }


Tela de Funcionario centralizada

Tela de Funcionario centralizada

Por que Cristina tem TOC.

--- MarotoPDV/EmployeeForm.Designer.cs
+++ MarotoPDV/EmployeeForm.Designer.cs
@@ -31,6 +31,7 @@
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EmployeeForm));
             this.groupBox_employee = new System.Windows.Forms.GroupBox();
+            this.textBox_id = new System.Windows.Forms.TextBox();
             this.textBox_address = new System.Windows.Forms.TextBox();
             this.maskedTextBox_telephone = new System.Windows.Forms.MaskedTextBox();
             this.comboBox_level = new System.Windows.Forms.ComboBox();
@@ -49,7 +50,6 @@
             this.button_cancel = new System.Windows.Forms.Button();
             this.button_close = new System.Windows.Forms.Button();
             this.imageList1 = new System.Windows.Forms.ImageList(this.components);
-            this.textBox_id = new System.Windows.Forms.TextBox();
             this.groupBox_employee.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox_logoStore)).BeginInit();
             this.SuspendLayout();
@@ -75,6 +75,15 @@
             this.groupBox_employee.TabStop = false;
             this.groupBox_employee.Text = "Employee";
             //
+            // textBox_id
+            //
+            this.textBox_id.Location = new System.Drawing.Point(452, 73);
+            this.textBox_id.Name = "textBox_id";
+            this.textBox_id.Size = new System.Drawing.Size(48, 20);
+            this.textBox_id.TabIndex = 12;
+            this.textBox_id.Text = "0000";
+            this.textBox_id.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            //
             // textBox_address
             //
             this.textBox_address.Location = new System.Drawing.Point(9, 150);
@@ -232,15 +241,6 @@
             this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
             this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
             this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
-            //
-            // textBox_id
-            //
-            this.textBox_id.Location = new System.Drawing.Point(452, 73);
-            this.textBox_id.Name = "textBox_id";
-            this.textBox_id.Size = new System.Drawing.Size(48, 20);
-            this.textBox_id.TabIndex = 12;
-            this.textBox_id.Text = "0000";
-            this.textBox_id.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             //
             // EmployeeForm
             //
@@ -258,6 +258,7 @@
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
             this.MaximizeBox = false;
             this.Name = "EmployeeForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "MarotoPDV";
             this.groupBox_employee.ResumeLayout(false);
             this.groupBox_employee.PerformLayout();


Fixed a bug in the TnefPropertyReader

Fixed a bug in the TnefPropertyReader

--- MimeKit/Tnef/TnefPropertyReader.cs
+++ MimeKit/Tnef/TnefPropertyReader.cs
@@ -626,7 +626,7 @@
 				return false;
 			}

-			return CheckRawValueLength ();
+			return true;
 		}

 		/// <summary>


Added pragmas to API/Bans

Added pragmas to API/Bans

--- src/Discord.Net/API/Bans.cs
+++ src/Discord.Net/API/Bans.cs
@@ -1,4 +1,8 @@
-namespace Discord.API
+//Ignore unused/unassigned variable warnings
+#pragma warning disable CS0649
+#pragma warning disable CS0169
+
+namespace Discord.API
 {
 	//Events
 	internal sealed class BanAddEvent : MemberReference { }


Fix issue with double view model creation on fragment

--- StormXamarin/Storm.Mvvm.Android.Shared/FragmentBase.cs
+++ StormXamarin/Storm.Mvvm.Android.Shared/FragmentBase.cs
@@ -51,8 +51,6 @@
 			{
 				RootView = CreateView(inflater, container);
 			}
-
-			SetViewModel(CreateViewModel());

 			return RootView;
 		}


modal set phone task

modal set phone task

--- MomWorld/Views/Account/Task.cshtml
+++ MomWorld/Views/Account/Task.cshtml
@@ -8,6 +8,55 @@

+
+
+

+

+

+

+                    <button type="button" class="close" data-dismiss="modal"
+                            aria-hidden="true">
+                        Thoát
+                    </button>
+
+

+                        Đặt số điện thoại
+

+

+

+
+                    <form class="form-horizontal">
+
+

+

+

+
+
+
+                                    <input type="text" class="form-control" id="phone-number" placeholder="Số điện thoại">
+

+

+

+
+

+

+                                <button class="btn btn-green" id="submitPhone">Đồng ý</button>
+                                <button type="reset" class="btn btn-red" data-dismiss="modal"
+                                        aria-hidden="true">
+                                    Hủy
+                                </button>
+

+

+                    </form>
+

+

+
+

+
+

+


OracleErrorLog ctor overload for specifying provider, as with config

--- src/Elmah/OracleErrorLog.cs
+++ src/Elmah/OracleErrorLog.cs
@@ -47,7 +47,7 @@
     public class OracleErrorLog : ErrorLog
     {
         private readonly string _connectionString;
-        private readonly string _providerName;
+        private readonly DbProviderFactory _dbProviderFactory;
         private string _schemaOwner;
         private bool _schemaOwnerInitialized;

@@ -56,30 +56,26 @@

         sealed class ProviderInfo
         {
-            public DbProviderFactory DbProviderFactory { get; private set; }
             public PropertyInfo ProviderSpecificTypeProperty { get; private set; }
             public object ClobDbType { get; private set; }
             public object RefCursorDbType { get; private set; }

-            public ProviderInfo(DbProviderFactory dbProviderFactory,
-                                PropertyInfo providerSpecificTypeProperty,
+            public ProviderInfo(PropertyInfo providerSpecificTypeProperty,
                                 object clobDbType, object refCursorDbType)
             {
-                Debug.Assert(dbProviderFactory != null);
                 Debug.Assert(providerSpecificTypeProperty != null);
                 Debug.Assert(clobDbType != null);
                 Debug.Assert(refCursorDbType != null);

-                DbProviderFactory = dbProviderFactory;
                 ProviderSpecificTypeProperty = providerSpecificTypeProperty;
                 ClobDbType = clobDbType;
                 RefCursorDbType = refCursorDbType;
             }
         }

-        private static readonly Func<string, ProviderInfo> _providerInfo = Memoization.MemoizeLast(GetProviderInfo, StringComparer.OrdinalIgnoreCase);
-
-        private ProviderInfo ThisProviderInfo { get { return _providerInfo(_providerName); } }
+        private static readonly Func<DbProviderFactory, ProviderInfo> _providerInfo = Memoization.MemoizeLast<DbProviderFactory, ProviderInfo>(GetProviderInfo);
+
+        private ProviderInfo ThisProviderInfo { get { return _providerInfo(_dbProviderFactory); } }

         private static DbParameter AddParameter(DbCommand command, string parameterName)
         {
@@ -133,30 +129,10 @@

             return matches.First(m => m.Key != null).Value;
         }
-
-        private static ProviderInfo GetProviderInfo(string providerName)
-        {
-            DbProviderFactory dbProviderFactory;
-
-            if (!string.IsNullOrEmpty(providerName))
-            {
-                //
-                // If the user has supplied a provider name, that's the one
-                // we must use.
-                //
-
-                dbProviderFactory = DbProviderFactories.GetFactory(providerName);
-            }
-            else
-            {
-                //
-                // Otherwise, we try to use ODP.Net in the first instance
-                // and then fallback to the Microsoft client.
-                //
-
-                dbProviderFactory = TryCreateDbProviderFactory("Oracle.DataAccess.Client")
-                                    ?? DbProviderFactories.GetFactory("System.Data.OracleClient");
-            }
+
+        private static ProviderInfo GetProviderInfo(DbProviderFactory dbProviderFactory)
+        {
+            Debug.Assert(dbProviderFactory != null);

             var parameter = dbProviderFactory.CreateParameter();
             if (parameter == null)
@@ -168,19 +144,45 @@
                 where attribute != null
                    && attribute.IsProviderSpecificTypeProperty
                 select property;
-
+
             var specificTypeProperty = specificTypeProperties.Single();
             var specificType = specificTypeProperty.PropertyType;
             var clobDbType = GetEnumValueOfAny(specificType, "NClob");
             var refCursorDbType = GetEnumValueOfAny(specificType, "Cursor", "RefCursor");

-            return new ProviderInfo(dbProviderFactory, specificTypeProperty, clobDbType, refCursorDbType);
+            return new ProviderInfo(specificTypeProperty, clobDbType, refCursorDbType);
+        }
+
+        private static DbProviderFactory GetDbProviderFactory(string providerName)
+        {
+            DbProviderFactory dbProviderFactory;
+
+            if (!string.IsNullOrEmpty(providerName))
+            {
+                //
+                // If the user has supplied a provider name, that's the one
+                // we must use.
+                //
+
+                dbProviderFactory = DbProviderFactories.GetFactory(providerName);
+            }
+            else
+            {
+                //
+                // Otherwise, we try to use ODP.Net in the first instance
+                // and then fallback to the Microsoft client.
+                //
+
+                dbProviderFactory = TryCreateDbProviderFactory("Oracle.DataAccess.Client")
+                                    ?? DbProviderFactories.GetFactory("System.Data.OracleClient");
+            }
+            return dbProviderFactory;
         }

         private DbConnection CreateOpenConnection()
         {
-            var connection = ThisProviderInfo.DbProviderFactory.CreateConnection();
-            Debug.Assert(connection != null);
+            var connection = _dbProviderFactory.CreateConnection();
+            Debug.Assert(connection != null); // TODO convert to run-time exception
             connection.ConnectionString = ConnectionString;
             connection.Open();
             return connection;
@@ -212,7 +214,8 @@
             // Initialize the provider factory if it hasn't already been done.
             //

-            _providerName = ConnectionStringHelper.GetConnectionStringProviderName(config);
+            var providerName = Mask.EmptyString(ConnectionStringHelper.GetConnectionStringProviderName(config), "");
+            _dbProviderFactory = GetDbProviderFactory(providerName);

             //
             // Set the application name as this implementation provides
@@ -246,15 +249,45 @@
         /// </summary>

         public OracleErrorLog(string connectionString) :
-            this(connectionString, null) {}
+            this(connectionString, (DbProviderFactory) null) {}

         /// <summary>
         /// Initializes a new instance of the <see cref="OracleErrorLog"/> class
-        /// to use a specific connection string for connecting to the database and
-        /// a specific schema owner.
-        /// </summary>
-
-        public OracleErrorLog(string connectionString, string schemaOwner)
+        /// to use a specific connection string and provider for connecting
+        /// to the database.
+        /// </summary>
+        /// <remarks>
+        /// The only supported <see cref="DbProviderFactory"/> instances are
+        /// those of <c>Oracle.DataAccess.Client</c> (ODP.NET) and
+        /// <c>System.Data.OracleClient</c>. The supplied instance is not
+        /// validated so any other provider will yield undefined behavior.
+        /// </remarks>
+
+        public OracleErrorLog(string connectionString, DbProviderFactory dbProviderFactory) :
+            this(connectionString, null, dbProviderFactory) {}
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="OracleErrorLog"/> class
+        /// to use a specific connection string for connecting  to the database.
+        /// An additional parameter specifies the schema owner.
+        /// </summary>
+
+        public OracleErrorLog(string connectionString, string schemaOwner) :
+            this(connectionString, schemaOwner, null) {}
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="OracleErrorLog"/> class
+        /// to use a specific connection string and provider  for connecting
+        /// to the database. An additional parameter specifies the schema owner.
+        /// </summary>
+        /// <remarks>
+        /// The only supported <see cref="DbProviderFactory"/> instances are
+        /// those of <c>Oracle.DataAccess.Client</c> (ODP.NET) and
+        /// <c>System.Data.OracleClient</c>. The supplied instance is not
+        /// validated so any other provider will yield undefined behavior.
+        /// </remarks>
+
+        public OracleErrorLog(string connectionString, string schemaOwner, DbProviderFactory dbProviderFactory)
         {
             if (connectionString == null)
                 throw new ArgumentNullException("connectionString");
@@ -263,6 +296,7 @@
                 throw new ArgumentException(null, "connectionString");

             _connectionString = connectionString;
+            _dbProviderFactory = dbProviderFactory ?? GetDbProviderFactory(null);
             SchemaOwner = schemaOwner;
         }


Re-ordering and -grouping OracleErrorLog members per importance and function

--- src/Elmah/OracleErrorLog.cs
+++ src/Elmah/OracleErrorLog.cs
@@ -46,6 +46,8 @@

     public class OracleErrorLog : ErrorLog
     {
+        private static readonly Func<DbProviderFactory, ProviderInfo> _providerInfo = Memoization.MemoizeLast<DbProviderFactory, ProviderInfo>(GetProviderInfo);
+
         private readonly string _connectionString;
         private readonly DbProviderFactory _dbProviderFactory;
         private string _schemaOwner;
@@ -53,141 +55,7 @@

         private const int _maxAppNameLength = 60;
         private const int _maxSchemaNameLength = 30;
-
-        sealed class ProviderInfo
-        {
-            public PropertyInfo ProviderSpecificTypeProperty { get; private set; }
-            public object ClobDbType { get; private set; }
-            public object RefCursorDbType { get; private set; }
-
-            public ProviderInfo(PropertyInfo providerSpecificTypeProperty,
-                                object clobDbType, object refCursorDbType)
-            {
-                Debug.Assert(providerSpecificTypeProperty != null);
-                Debug.Assert(clobDbType != null);
-                Debug.Assert(refCursorDbType != null);
-
-                ProviderSpecificTypeProperty = providerSpecificTypeProperty;
-                ClobDbType = clobDbType;
-                RefCursorDbType = refCursorDbType;
-            }
-        }
-
-        private static readonly Func<DbProviderFactory, ProviderInfo> _providerInfo = Memoization.MemoizeLast<DbProviderFactory, ProviderInfo>(GetProviderInfo);
-
-        private ProviderInfo ThisProviderInfo { get { return _providerInfo(_dbProviderFactory); } }
-
-        private static DbParameter AddParameter(DbCommand command, string parameterName)
-        {
-            var parameter = command.CreateParameter();
-            parameter.ParameterName = parameterName;
-            command.Parameters.Add(parameter);
-            return parameter;
-        }
-
-        private static DbParameter AddGenericTypeParameter(DbCommand command, string parameterName, DbType dbType)
-        {
-            var parameter = AddParameter(command, parameterName);
-            parameter.DbType = dbType;
-            return parameter;
-        }
-
-        private DbParameter AddProviderSpecificTypeParameter(DbCommand command, string parameterName, object dbType)
-        {
-            var parameter = AddParameter(command, parameterName);
-            ThisProviderInfo.ProviderSpecificTypeProperty.SetValue(parameter, dbType, null);
-            return parameter;
-        }
-
-        private static DbProviderFactory TryCreateDbProviderFactory(string providerInvariantName)
-        {
-            try
-            {
-                return DbProviderFactories.GetFactory(providerInvariantName);
-            }
-            catch (ArgumentException)
-            {
-                return null;
-            }
-        }
-
-        static object GetEnumValueOfAny(Type enumType, params string[] candidates)
-        {
-            Debug.Assert(enumType != null);
-            Debug.Assert(enumType.IsEnum);
-            Debug.Assert(candidates != null);
-
-            var names = Enum.GetNames(enumType);
-            var pairs = Enum.GetValues(enumType)
-                            .Cast<object>()
-                            .Select((v, i) => new KeyValuePair<string, object>(names[i], v))
-                            .ToArray();
-
-            var matches =
-                from dbType in candidates
-                select pairs.FirstOrDefault(p => p.Key.Equals(dbType, StringComparison.OrdinalIgnoreCase));
-
-            return matches.First(m => m.Key != null).Value;
-        }
-
-        private static ProviderInfo GetProviderInfo(DbProviderFactory dbProviderFactory)
-        {
-            Debug.Assert(dbProviderFactory != null);
-
-            var parameter = dbProviderFactory.CreateParameter();
-            if (parameter == null)
-                throw new NotSupportedException();
-
-            var specificTypeProperties =
-                from property in parameter.GetType().GetProperties()
-                let attribute = (DbProviderSpecificTypePropertyAttribute) Attribute.GetCustomAttribute(property, typeof(DbProviderSpecificTypePropertyAttribute), false)
-                where attribute != null
-                   && attribute.IsProviderSpecificTypeProperty
-                select property;
-
-            var specificTypeProperty = specificTypeProperties.Single();
-            var specificType = specificTypeProperty.PropertyType;
-            var clobDbType = GetEnumValueOfAny(specificType, "NClob");
-            var refCursorDbType = GetEnumValueOfAny(specificType, "Cursor", "RefCursor");
-
-            return new ProviderInfo(specificTypeProperty, clobDbType, refCursorDbType);
-        }
-
-        private static DbProviderFactory GetDbProviderFactory(string providerName)
-        {
-            DbProviderFactory dbProviderFactory;
-
-            if (!string.IsNullOrEmpty(providerName))
-            {
-                //
-                // If the user has supplied a provider name, that's the one
-                // we must use.
-                //
-
-                dbProviderFactory = DbProviderFactories.GetFactory(providerName);
-            }
-            else
-            {
-                //
-                // Otherwise, we try to use ODP.Net in the first instance
-                // and then fallback to the Microsoft client.
-                //
-
-                dbProviderFactory = TryCreateDbProviderFactory("Oracle.DataAccess.Client")
-                                    ?? DbProviderFactories.GetFactory("System.Data.OracleClient");
-            }
-            return dbProviderFactory;
-        }
-
-        private DbConnection CreateOpenConnection()
-        {
-            var connection = _dbProviderFactory.CreateConnection();
-            Debug.Assert(connection != null); // TODO convert to run-time exception
-            connection.ConnectionString = ConnectionString;
-            connection.Open();
-            return connection;
-        }
-
+
         /// <summary>
         /// Initializes a new instance of the <see cref="OracleErrorLog"/> class
         /// using a dictionary of configured settings.
@@ -292,6 +160,8 @@
             _dbProviderFactory = dbProviderFactory ?? GetDbProviderFactory(null);
             SchemaOwner = schemaOwner;
         }
+
+        private ProviderInfo ThisProviderInfo { get { return _providerInfo(_dbProviderFactory); } }

         /// <summary>
         /// Gets the name of the schema owner where the errors are being stored.
@@ -523,5 +393,136 @@
             var error = ErrorXml.DecodeString(errorXml);
             return new ErrorLogEntry(this, id, error);
         }
+
+        private DbConnection CreateOpenConnection()
+        {
+            var connection = _dbProviderFactory.CreateConnection();
+            Debug.Assert(connection != null); // TODO convert to run-time exception
+            connection.ConnectionString = ConnectionString;
+            connection.Open();
+            return connection;
+        }
+
+        private static DbProviderFactory GetDbProviderFactory(string providerName)
+        {
+            DbProviderFactory dbProviderFactory;
+
+            if (!string.IsNullOrEmpty(providerName))
+            {
+                //
+                // If the user has supplied a provider name, that's the one
+                // we must use.
+                //
+
+                dbProviderFactory = DbProviderFactories.GetFactory(providerName);
+            }
+            else
+            {
+                //
+                // Otherwise, we try to use ODP.Net in the first instance
+                // and then fallback to the Microsoft client.
+                //
+
+                dbProviderFactory = TryCreateDbProviderFactory("Oracle.DataAccess.Client")
+                                    ?? DbProviderFactories.GetFactory("System.Data.OracleClient");
+            }
+
+            return dbProviderFactory;
+        }
+
+        private static DbProviderFactory TryCreateDbProviderFactory(string providerInvariantName)
+        {
+            try
+            {
+                return DbProviderFactories.GetFactory(providerInvariantName);
+            }
+            catch (ArgumentException)
+            {
+                return null;
+            }
+        }
+
+        sealed class ProviderInfo
+        {
+            public PropertyInfo ProviderSpecificTypeProperty { get; private set; }
+            public object ClobDbType { get; private set; }
+            public object RefCursorDbType { get; private set; }
+
+            public ProviderInfo(PropertyInfo providerSpecificTypeProperty,
+                                object clobDbType, object refCursorDbType)
+            {
+                Debug.Assert(providerSpecificTypeProperty != null);
+                Debug.Assert(clobDbType != null);
+                Debug.Assert(refCursorDbType != null);
+
+                ProviderSpecificTypeProperty = providerSpecificTypeProperty;
+                ClobDbType = clobDbType;
+                RefCursorDbType = refCursorDbType;
+            }
+        }
+
+        private static ProviderInfo GetProviderInfo(DbProviderFactory dbProviderFactory)
+        {
+            Debug.Assert(dbProviderFactory != null);
+
+            var parameter = dbProviderFactory.CreateParameter();
+            if (parameter == null)
+                throw new NotSupportedException();
+
+            var specificTypeProperties =
+                from property in parameter.GetType().GetProperties()
+                let attribute = (DbProviderSpecificTypePropertyAttribute)Attribute.GetCustomAttribute(property, typeof(DbProviderSpecificTypePropertyAttribute), false)
+                where attribute != null
+                   && attribute.IsProviderSpecificTypeProperty
+                select property;
+
+            var specificTypeProperty = specificTypeProperties.Single();
+            var specificType = specificTypeProperty.PropertyType;
+            var clobDbType = GetEnumValueOfAny(specificType, "NClob");
+            var refCursorDbType = GetEnumValueOfAny(specificType, "Cursor", "RefCursor");
+
+            return new ProviderInfo(specificTypeProperty, clobDbType, refCursorDbType);
+        }
+
+        static object GetEnumValueOfAny(Type enumType, params string[] candidates)
+        {
+            Debug.Assert(enumType != null);
+            Debug.Assert(enumType.IsEnum);
+            Debug.Assert(candidates != null);
+
+            var names = Enum.GetNames(enumType);
+            var pairs = Enum.GetValues(enumType)
+                            .Cast<object>()
+                            .Select((v, i) => new KeyValuePair<string, object>(names[i], v))
+                            .ToArray();
+
+            var matches =
+                from dbType in candidates
+                select pairs.FirstOrDefault(p => p.Key.Equals(dbType, StringComparison.OrdinalIgnoreCase));
+
+            return matches.First(m => m.Key != null).Value;
+        }
+
+        private static DbParameter AddParameter(DbCommand command, string parameterName)
+        {
+            var parameter = command.CreateParameter();
+            parameter.ParameterName = parameterName;
+            command.Parameters.Add(parameter);
+            return parameter;
+        }
+
+        private static DbParameter AddGenericTypeParameter(DbCommand command, string parameterName, DbType dbType)
+        {
+            var parameter = AddParameter(command, parameterName);
+            parameter.DbType = dbType;
+            return parameter;
+        }
+
+        private DbParameter AddProviderSpecificTypeParameter(DbCommand command, string parameterName, object dbType)
+        {
+            var parameter = AddParameter(command, parameterName);
+            ThisProviderInfo.ProviderSpecificTypeProperty.SetValue(parameter, dbType, null);
+            return parameter;
+        }
     }
 }