InedoSDK Reference
Version:

PackageSourceId Class

Represents a unique identifier for a package source, which can be a URL, SecureResource, or ProGet Feed.

Inheritance Hierarchy

  • object
    • System.ValueType
      • Inedo.Extensions.PackageSources.PackageSourceId

Syntax

public sealed class PackageSourceId : System.ValueType, IEquatable<T>

Constructors

Name Description
PackageSourceId(string idString)

Initializes a new instance of the PackageSourceId struct.

Properties

Name Description
Format

Gets the ID format.

Methods

Name Description
Equals(object obj)
GetFeedName

Returns the feed name if Format is PackageSourceIdFormat.ProGetFeed; otherwise throws.

GetHashCode
GetProGetServiceCredentialName

Returns the credential name if Format is PackageSourceIdFormat.ProGetFeed; otherwise throws.

GetResourceName

Returns the feed name if Format is PackageSourceIdFormat.SecureResource; otherwise throws.

GetUrl

Returns the URL if Format is PackageSourceIdFormat.Url; otherwise throws.

ToString

Remarks

This effectively wraps a string that can take one of three formats and provides helper methods.

Example strings include:

  • https://www.myget.org/F/imageprocessor/api/v3/index.json [Format=Url]

  • global::ProGet/MyFeedName [Format=ProGetFeed]

  • feed::MyFeedName [Format=ProGetFeed]

  • global::ProGetOtherInstance/MyOtherFeedName [Format=ProGetFeed]

  • MyNuGetOrgResource [Format=SecureResource]

Non-Url strings with a "/" are a ProGetServiceCredential name + Feed Name, and "feed::" is shorthand for "global::ProGet/"