Skip to content

Commit 18013a5

Browse files
committed
Merge v4.5.4
Upgraded the target framework from `.NET Framework 4.6.2` to `.NET Framework 4.7.2`. Updated NuGet package references, `Dapper.StrongName` to version `2.1.35`, `Microsoft.CodeDom.Providers.DotNetCompilerPlatform` to `4.1.0`, and `Oracle.ManagedDataAccess.Core` to `2.19.280`
1 parent 5c59f17 commit 18013a5

File tree

10 files changed

+45
-44
lines changed

10 files changed

+45
-44
lines changed

samples/Samples.Mvc5.Oracle/Controllers/BaseController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ public abstract class BaseController : Controller
1414
/// <summary>
1515
/// keep track of the profiler to dispose it.
1616
/// </summary>
17-
private IDisposable _resultExecutingToExecuted;
17+
private IDisposable? _resultExecutingToExecuted;
1818

1919
/// <summary>
2020
/// Returns an open connection that will have its queries profiled.
2121
/// </summary>
2222
/// <param name="profiler">The mini profiler.</param>
2323
/// <returns>the data connection abstraction.</returns>
24-
public static DbConnection GetConnection(MiniProfiler profiler = null)
24+
public static DbConnection GetConnection(MiniProfiler? profiler = null)
2525
{
2626
using (profiler.Step("GetOpenConnection"))
2727
{

samples/Samples.Mvc5.Oracle/Controllers/HomeController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private ActionResult HomeWithPosition(RenderPosition pos)
6767
/// </summary>
6868
private void DefaultActions()
6969
{
70-
var profiler = MiniProfiler.Current;
70+
var profiler = MiniProfiler.Current!;
7171

7272
// test out using storage for this one request. Only store in Oracle Database, not in httpCache
7373
profiler.Storage = new OracleMiniProfilerStorage(MvcApplication.ConnectionString);
@@ -232,7 +232,7 @@ public ActionResult EFCodeFirst()
232232
int count;
233233
int? newCount = null;
234234

235-
EFContext context = null;
235+
EFContext? context = null;
236236
using (MiniProfiler.Current.Step("EF Stuff"))
237237
{
238238
try
@@ -247,7 +247,7 @@ public ActionResult EFCodeFirst()
247247
using (MiniProfiler.Current.Step("Insertion"))
248248
{
249249
var p = new Person { Name = "sam" };
250-
context.People.Add(p);
250+
context.People?.Add(p);
251251
context.SaveChanges();
252252
}
253253

@@ -334,7 +334,7 @@ public ActionResult MassiveNesting2()
334334
/// <param name="depth">recursion depth</param>
335335
/// <param name="connection">the connection</param>
336336
/// <param name="profiler">The profiler.</param>
337-
private void RecursiveMethod(ref int depth, DbConnection connection, MiniProfiler profiler)
337+
private void RecursiveMethod(ref int depth, DbConnection connection, MiniProfiler? profiler)
338338
{
339339
Thread.Sleep(5); // ensure we show up in the profiler
340340

@@ -433,7 +433,7 @@ public class RouteHit
433433
/// <summary>
434434
/// Gets or sets the route name.
435435
/// </summary>
436-
public string RouteName { get; set; }
436+
public string? RouteName { get; set; }
437437

438438
/// <summary>
439439
/// Gets or sets the hit count.

samples/Samples.Mvc5.Oracle/EFCodeFirst/EFContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ protected override void OnModelCreating(DbModelBuilder modelBuilder)
2222
/// <summary>
2323
/// Gets or sets the people.
2424
/// </summary>
25-
public DbSet<Person> People { get; set; }
25+
public DbSet<Person>? People { get; set; }
2626
}
2727
}

samples/Samples.Mvc5.Oracle/EFCodeFirst/Person.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ public class Person
1313
/// <summary>
1414
/// Gets or sets the name.
1515
/// </summary>
16-
public string Name { get; set; }
16+
public string? Name { get; set; }
1717
}
1818
}

samples/Samples.Mvc5.Oracle/Global.asax.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.IO;
32
using System.Web;
43
using System.Web.Mvc;
54
using System.Web.Optimization;
@@ -10,7 +9,6 @@
109
using StackExchange.Profiling.Mvc;
1110
using StackExchange.Profiling.Storage;
1211
using Samples.Mvc5.Helpers;
13-
using Oracle.ManagedDataAccess.Client;
1412
using System.Configuration;
1513

1614
namespace Samples.Mvc5
@@ -20,7 +18,7 @@ public class MvcApplication : HttpApplication
2018
/// <summary>
2119
/// Gets the connection string.
2220
/// </summary>
23-
public static string ConnectionString;
21+
public static string ConnectionString { get; private set; } = string.Empty;
2422

2523
protected void Application_Start()
2624
{
@@ -41,7 +39,7 @@ protected void Application_Start()
4139
/// </summary>
4240
protected void Application_BeginRequest()
4341
{
44-
MiniProfiler profiler = null;
42+
MiniProfiler? profiler = null;
4543

4644
// might want to decide here (or maybe inside the action) whether you want
4745
// to profile this request - for example, using an "IsSystemAdmin" flag against
@@ -107,6 +105,7 @@ private void InitProfilerSettings()
107105
// specified position in the .RenderIncludes() call.
108106
PopupRenderPosition = RenderPosition.Right, // defaults to left
109107
PopupMaxTracesToShow = 10, // defaults to 15
108+
PopupDecimalPlaces = 1, // defaults to 2
110109
ColorScheme = ColorScheme.Auto, // defaults to light
111110

112111
// ResultsAuthorize (optional - open to all by default):

samples/Samples.Mvc5.Oracle/Helpers/OracleMiniProfilerStorage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace Samples.Mvc5.Helpers
1111
{
1212
/// <summary>
13-
/// The SQLITE mini profiler storage.
13+
/// The Oracle mini profiler storage.
1414
/// </summary>
1515
public class OracleMiniProfilerStorage : OracleStorage
1616
{

samples/Samples.Mvc5.Oracle/Samples.Mvc5.Oracle.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<OutputType>Library</OutputType>
66
<RootNamespace>Samples.Mvc5</RootNamespace>
77
<AssemblyName>Samples.Mvc5</AssemblyName>
8-
<TargetFramework>net462</TargetFramework>
8+
<TargetFramework>net472</TargetFramework>
99
<UseIISExpress>true</UseIISExpress>
1010
<OutputPath>bin\</OutputPath>
1111
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
@@ -20,12 +20,11 @@
2020
<ProjectReference Include="..\..\src\MiniProfiler.Providers.Oracle\MiniProfiler.Providers.Oracle.csproj" />
2121
<ProjectReference Include="..\..\src\MiniProfiler.Shared\MiniProfiler.Shared.csproj" />
2222
<ProjectReference Include="..\..\src\MiniProfiler\MiniProfiler.csproj" />
23-
<PackageReference Include="Dapper.StrongName" Version="1.50.2" />
23+
<PackageReference Include="Dapper.StrongName" Version="2.1.35" />
2424
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.3" />
2525
<PackageReference Include="Microsoft.AspNet.Web.Optimization" Version="1.1.3" />
26-
<PackageReference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" Version="1.0.8" />
27-
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.19.190" />
28-
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.19.220" />
26+
<PackageReference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" Version="4.1.0" />
27+
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.19.280" />
2928
<Reference Include="Microsoft.CSharp" />
3029
<Reference Include="System" />
3130
<Reference Include="System.Data" />

samples/Samples.Mvc5.Oracle/Web.config

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,10 @@
1717
<version number="*">
1818
</version>
1919
</oracle.manageddataaccess.client>
20-
<entityFramework>
21-
<providers>
22-
<provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
23-
</providers>
24-
</entityFramework>
25-
<system.data>
26-
<DbProviderFactories>
27-
<remove invariant="Oracle.ManagedDataAccess.Client" />
28-
<add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
29-
</DbProviderFactories>
30-
</system.data>
3120
<system.web>
3221
<compilation debug="true" targetFramework="4.6.2" />
3322
<httpRuntime targetFramework="4.6.2" />
3423
</system.web>
35-
<system.webServer>
36-
<validation validateIntegratedModeConfiguration="false" />
37-
<modules runAllManagedModulesForAllRequests="true" />
38-
</system.webServer>
3924
<runtime>
4025
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
4126
<dependentAssembly>
@@ -46,10 +31,6 @@
4631
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
4732
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
4833
</dependentAssembly>
49-
<dependentAssembly>
50-
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
51-
<bindingRedirect oldVersion="0.0.0.0-3.4.1.9004" newVersion="3.4.1.9004" />
52-
</dependentAssembly>
5334
<dependentAssembly>
5435
<publisherPolicy apply="no" />
5536
<assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
@@ -67,11 +48,31 @@
6748
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
6849
<bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
6950
</dependentAssembly>
51+
<dependentAssembly>
52+
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
53+
<bindingRedirect oldVersion="0.0.0.0-3.4.1.9004" newVersion="3.4.1.9004" />
54+
</dependentAssembly>
7055
</assemblyBinding>
7156
</runtime>
57+
<system.webServer>
58+
<validation validateIntegratedModeConfiguration="false" />
59+
<modules runAllManagedModulesForAllRequests="true" />
60+
</system.webServer>
7261
<system.codedom>
7362
<compilers>
74-
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
63+
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
64+
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008,40000,40008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
7565
</compilers>
7666
</system.codedom>
67+
<system.data>
68+
<DbProviderFactories>
69+
<remove invariant="Oracle.ManagedDataAccess.Client" />
70+
<add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
71+
</DbProviderFactories>
72+
</system.data>
73+
<entityFramework>
74+
<providers>
75+
<provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
76+
</providers>
77+
</entityFramework>
7778
</configuration>

src/MiniProfiler.Providers.Oracle/MiniProfiler.Providers.Oracle.csproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
<Description>MiniProfiler: Profiler storage for Oracle Database</Description>
66
<Authors>Marc Gravell, Jarrod Dixon, Yaakov Ellis, Nick Craver, Fernando Paz</Authors>
77
<PackageTags>Oracle;$(PackageBaseTags)</PackageTags>
8-
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
8+
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
99
</PropertyGroup>
10+
1011
<ItemGroup>
11-
<ProjectReference Include="..\MiniProfiler.Shared\MiniProfiler.Shared.csproj" />
12-
<PackageReference Include="Dapper.StrongName" Version="1.50.2" />
12+
<PackageReference Include="Dapper.StrongName" Version="2.1.35" />
1313
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
14-
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.19.220" />
14+
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.19.280" />
15+
16+
<ProjectReference Include="..\MiniProfiler.Shared\MiniProfiler.Shared.csproj" />
1517
</ItemGroup>
1618
</Project>

src/MiniProfiler.Providers.Oracle/OracleDynamicParameters.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public T Get<T>(string name)
216216
if (val == DBNull.Value)
217217
{
218218
#pragma warning disable CS8603 // Possible null reference return.
219-
return default(T) == null ? default(T) : throw new InvalidCastException("Attempting to cast a DBNull to a non nullable type!");
219+
return default(T) is null ? default(T) : throw new InvalidCastException("Attempting to cast a DBNull to a non nullable type!");
220220
#pragma warning restore CS8603 // Possible null reference return.
221221
}
222222
return (T)val;

0 commit comments

Comments
 (0)