ironfede / openmcdf

Microsoft Compound File .net component - pure C# - netstandard 2.0
Mozilla Public License 2.0
297 stars 73 forks source link

cfStorage in TryGetStorage should be declared as `out` #52

Closed phuclv90 closed 4 years ago

phuclv90 commented 5 years ago

TryGetStorage was declared to receive a cfStorage value, however in fact it should be out so that we can return the storage to the caller

    public bool TryGetStorage(String storageName, CFStorage cfStorage)

https://github.com/ironfede/openmcdf/blob/03db329bab58feca21ddd4acf56673387b899450/sources/OpenMcdf/CFStorage.cs#L388

The name of the parameter in the comment above the function also slightly differs from the function declaration

/// bool b = cf.RootStorage.TryGetStorage("MyStorage",out CFStorage st);