Skip to main content

Definition

Assembly: CloudNimble.EasyAF.MSBuild.dll Namespace: CloudNimble.EasyAF.MSBuild Inheritance: System.Object

Syntax

CloudNimble.EasyAF.MSBuild.ItemGroupBuilder

Summary

Builder class for configuring MSBuild ItemGroups in a fluent manner.

Remarks

This class provides a fluent API for adding items to MSBuild ItemGroups, making it easier to construct complex project structures programmatically.

Constructors

.ctor Inherited

Inherited from object

Syntax

public Object()

Methods

AddAdditionalFiles

Adds an AdditionalFiles item to the ItemGroup.

Syntax

public CloudNimble.EasyAF.MSBuild.ItemBuilder AddAdditionalFiles(string include)

Parameters

NameTypeDescription
includestringThe file pattern to include.

Returns

Type: CloudNimble.EasyAF.MSBuild.ItemBuilder An ItemBuilder for further configuration of the AdditionalFiles item.

Exceptions

ExceptionDescription
ArgumentExceptionThrown when include is null or whitespace.

AddItem

Adds a generic item to the ItemGroup.

Syntax

public CloudNimble.EasyAF.MSBuild.ItemBuilder AddItem(string itemType, string include)

Parameters

NameTypeDescription
itemTypestringThe type of the item.
includestringThe include value for the item.

Returns

Type: CloudNimble.EasyAF.MSBuild.ItemBuilder An ItemBuilder for further configuration of the item.

Exceptions

ExceptionDescription
ArgumentExceptionThrown when itemType or include is null or whitespace.

AddPackageReference

Adds a PackageReference item to the ItemGroup.

Syntax

public CloudNimble.EasyAF.MSBuild.ItemBuilder AddPackageReference(string packageId, string version)

Parameters

NameTypeDescription
packageIdstringThe package ID.
versionstringThe package version.

Returns

Type: CloudNimble.EasyAF.MSBuild.ItemBuilder An ItemBuilder for further configuration of the PackageReference.

Exceptions

ExceptionDescription
ArgumentExceptionThrown when packageId or version is null or whitespace.

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?