C# Class NuGet.VersionUtility

显示文件 Open project: NuGetPackageExplorer/NuGetPackageExplorer Class Usage Examples

Private Properties

Property Type Description
ParseFrameworkFolderName FrameworkName
ParseFrameworkNameFromFilePath FrameworkName
ValidatePortableFrameworkProfilePart bool

Public Methods

Method Description
GetFrameworkString ( FrameworkName frameworkName ) : string
GetShortFrameworkName ( FrameworkName frameworkName ) : string
ParseFrameworkFolderName ( string path ) : FrameworkName
ParseFrameworkName ( string frameworkName ) : FrameworkName

This function tries to normalize a string that represents framework version names into something a framework name that the package manager understands.

ParseOptionalVersion ( string version ) : System.Version
ParseVersionSpec ( string value ) : IVersionSpec

The version string is either a simple version or an arithmetic range e.g. 1.0 --> 1.0 ≤ x (,1.0] --> x ≤ 1.0 (,1.0) --> x < 1.0 [1.0] --> x == 1.0 (1.0,) --> 1.0 < x (1.0, 2.0) --> 1.0 < x < 2.0 [1.0, 2.0] --> 1.0 ≤ x ≤ 2.0

TryParseVersion ( string versionValue, SemanticVersion &version ) : bool
TryParseVersionSpec ( string value, IVersionSpec &result ) : bool

Private Methods

Method Description
ParseFrameworkFolderName ( string path, bool strictParsing, string &effectivePath ) : FrameworkName
ParseFrameworkNameFromFilePath ( string filePath, string &effectivePath ) : FrameworkName
ValidatePortableFrameworkProfilePart ( string profilePart ) : bool

Method Details

GetFrameworkString() public static method

public static GetFrameworkString ( FrameworkName frameworkName ) : string
frameworkName FrameworkName
return string

GetShortFrameworkName() public static method

public static GetShortFrameworkName ( FrameworkName frameworkName ) : string
frameworkName FrameworkName
return string

ParseFrameworkFolderName() public static method

public static ParseFrameworkFolderName ( string path ) : FrameworkName
path string
return FrameworkName

ParseFrameworkName() public static method

This function tries to normalize a string that represents framework version names into something a framework name that the package manager understands.
public static ParseFrameworkName ( string frameworkName ) : FrameworkName
frameworkName string
return FrameworkName

ParseOptionalVersion() public static method

public static ParseOptionalVersion ( string version ) : System.Version
version string
return System.Version

ParseVersionSpec() public static method

The version string is either a simple version or an arithmetic range e.g. 1.0 --> 1.0 ≤ x (,1.0] --> x ≤ 1.0 (,1.0) --> x < 1.0 [1.0] --> x == 1.0 (1.0,) --> 1.0 < x (1.0, 2.0) --> 1.0 < x < 2.0 [1.0, 2.0] --> 1.0 ≤ x ≤ 2.0
public static ParseVersionSpec ( string value ) : IVersionSpec
value string
return IVersionSpec

TryParseVersion() public static method

public static TryParseVersion ( string versionValue, SemanticVersion &version ) : bool
versionValue string
version SemanticVersion
return bool

TryParseVersionSpec() public static method

public static TryParseVersionSpec ( string value, IVersionSpec &result ) : bool
value string
result IVersionSpec
return bool