File tree 6 files changed +9
-9
lines changed
6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 2
2
3
3
<PropertyGroup >
4
4
<OutputType >Exe</OutputType >
5
- <TargetFramework >net7 .0</TargetFramework >
5
+ <TargetFramework >net8 .0</TargetFramework >
6
6
<Nullable >enable</Nullable >
7
7
<ImplicitUsings >enable</ImplicitUsings >
8
8
</PropertyGroup >
Original file line number Diff line number Diff line change @@ -5,15 +5,15 @@ public SomeInnerResource() =>
5
5
6
6
public void Foo ( )
7
7
{
8
- if ( disposedValue ) throw new ObjectDisposedException ( nameof ( SomeInnerResource ) ) ;
8
+ ObjectDisposedException . ThrowIf ( isDisposed , this ) ;
9
9
Console . WriteLine ( $ "{ nameof ( SomeInnerResource ) } .{ nameof ( Foo ) } ") ;
10
10
}
11
11
12
- private bool disposedValue = false ; // To detect redundant calls
12
+ private bool isDisposed = false ; // To detect redundant calls
13
13
14
14
protected virtual void Dispose ( bool disposing )
15
15
{
16
- if ( ! disposedValue )
16
+ if ( ! isDisposed )
17
17
{
18
18
if ( disposing )
19
19
{
@@ -24,7 +24,7 @@ protected virtual void Dispose(bool disposing)
24
24
Console . WriteLine ( "simulation to release native memory" ) ;
25
25
// TODO: set large fields to null.
26
26
27
- disposedValue = true ;
27
+ isDisposed = true ;
28
28
}
29
29
}
30
30
Original file line number Diff line number Diff line change 2
2
3
3
<PropertyGroup >
4
4
<OutputType >Exe</OutputType >
5
- <TargetFramework >net7 .0</TargetFramework >
5
+ <TargetFramework >net8 .0</TargetFramework >
6
6
<Nullable >enable</Nullable >
7
7
<ImplicitUsings >enable</ImplicitUsings >
8
8
</PropertyGroup >
Original file line number Diff line number Diff line change 2
2
3
3
<PropertyGroup >
4
4
<OutputType >Exe</OutputType >
5
- <TargetFramework >net7 .0</TargetFramework >
5
+ <TargetFramework >net8 .0</TargetFramework >
6
6
<Nullable >enable</Nullable >
7
7
<ImplicitUsings >enable</ImplicitUsings >
8
8
</PropertyGroup >
Original file line number Diff line number Diff line change 2
2
3
3
<PropertyGroup >
4
4
<OutputType >Exe</OutputType >
5
- <TargetFramework >net7 .0</TargetFramework >
5
+ <TargetFramework >net8 .0</TargetFramework >
6
6
<Nullable >enable</Nullable >
7
7
<ImplicitUsings >enable</ImplicitUsings >
8
8
</PropertyGroup >
Original file line number Diff line number Diff line change 2
2
3
3
<PropertyGroup >
4
4
<OutputType >Exe</OutputType >
5
- <TargetFramework >net7 .0</TargetFramework >
5
+ <TargetFramework >net8 .0</TargetFramework >
6
6
<Nullable >enable</Nullable >
7
7
<ImplicitUsings >enable</ImplicitUsings >
8
8
<AllowUnsafeBlocks >True</AllowUnsafeBlocks >
You can’t perform that action at this time.
0 commit comments