Class NugetFeed
- Namespace
- Invex.Atom.Module.Dotnet.Model
- Assembly
- Invex.Atom.Module.Dotnet.dll
Represents a NuGet feed configuration, including its URL, name, and optional credentials.
public sealed record NugetFeed
- Inheritance
-
objectNugetFeed
Examples
var feed = new NugetFeed("https://pkgs.dev.azure.com/org/_packaging/feed/nuget/v3/index.json", "MyFeed")
{
Username = () => "user",
Password = () => FeedToken,
};
Remarks
Credentials are supplied as delegates so that secrets are only resolved when the NuGet.Config file is written.
Constructors
NugetFeed(string, string?)
Represents a NuGet feed configuration, including its URL, name, and optional credentials.
public NugetFeed(string Url, string? Name = null)
Parameters
UrlstringThe URL of the NuGet feed.
NamestringOptional. The name of the NuGet feed. Defaults to
Feed{index}when written to a config file.
Examples
var feed = new NugetFeed("https://pkgs.dev.azure.com/org/_packaging/feed/nuget/v3/index.json", "MyFeed")
{
Username = () => "user",
Password = () => FeedToken,
};
Remarks
Credentials are supplied as delegates so that secrets are only resolved when the NuGet.Config file is written.
Properties
Name
Optional. The name of the NuGet feed. Defaults to Feed{index} when written to a config file.
public string? Name { get; init; }
Property Value
- string
Password
Gets the delegate that provides the (encrypted) password for the NuGet feed, or null if none is required.
public Func<string?>? Password { get; init; }
Property Value
- Func<string>
PlainTextPassword
Gets the delegate that provides the clear text password for the NuGet feed, or null if none is required.
Use with caution.
public Func<string?>? PlainTextPassword { get; init; }
Property Value
- Func<string>
Url
The URL of the NuGet feed.
public string Url { get; init; }
Property Value
- string
Username
Gets the delegate that provides the username for the NuGet feed, or null if none is required.
public Func<string?>? Username { get; init; }
Property Value
- Func<string>