Skip to content

Commit 9758b96

Browse files
Fix nullability for TryOpenStream/Storage
Fixes: #238
1 parent 9212b53 commit 9758b96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

OpenMcdf/Storage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public Storage OpenStorage(string name)
119119
? storage!
120120
: throw new DirectoryNotFoundException($"Storage not found: {name}.");
121121

122-
public bool TryOpenStorage(string name, [MaybeNullWhen(false)] out Storage? storage)
122+
public bool TryOpenStorage(string name, [MaybeNullWhen(false)] out Storage storage)
123123
{
124124
ThrowHelper.ThrowIfNameIsInvalid(name);
125125

@@ -141,7 +141,7 @@ public CfbStream OpenStream(string name)
141141
? stream!
142142
: throw new FileNotFoundException($"Stream not found: {name}.", name);
143143

144-
public bool TryOpenStream(string name, [MaybeNullWhen(false)] out CfbStream? stream)
144+
public bool TryOpenStream(string name, [MaybeNullWhen(false)] out CfbStream stream)
145145
{
146146
ThrowHelper.ThrowIfNameIsInvalid(name);
147147
this.ThrowIfDisposed(Context.IsDisposed);

0 commit comments

Comments
 (0)