Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

No Contracts for Directory.GetFiles(String, String, SearchOption) #249

@yaakov-h

Description

@yaakov-h

Looks to me like Code Contracts is missing this overload:

https://github.com/Microsoft/CodeContracts/blob/master/Microsoft.Research/Contracts/MsCorlib/System.IO.Directory.cs#L142-L163

Should have the same contract as the others, plus an ArgumentOutOfRangeException as follows:

if ((searchOption != SearchOption.TopDirectoryOnly) && (searchOption != SearchOption.AllDirectories))
                throw new ArgumentOutOfRangeException("searchOption", Environment.GetResourceString("ArgumentOutOfRange_Enum"));

http://referencesource.microsoft.com/#mscorlib/system/io/directory.cs,623

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions