Skip to main content

Definition

Assembly: CloudNimble.EasyAF.Tools.dll Namespace: CloudNimble.EasyAF.Tools.Commands Inheritance: CloudNimble.EasyAF.Tools.Commands.EasyAFBaseCommand

Syntax

Summary

Creates a new EasyAF solution: the Core, Data, Business, Api, MessageBus, and Tests projects, referenced the way EasyAF expects, with the solution-level build files and an .slnx.

Remarks

Projects are created in-process from the SDK’s own classlib, web, and console templates, then configured with EasyAF project types, package references, and project references. EasyAF files (Program.cs, appsettings, test bases) are written over the template output. new only creates and links projects. It doesn’t connect a database, restore, build, or start any process; dotnet easyaf init connects a database afterwards.

Constructors

.ctor

Syntax

.ctor Inherited

Inherited from CloudNimble.EasyAF.Tools.Commands.EasyAFBaseCommand

Syntax

.ctor Inherited

Inherited from object

Syntax

Properties

Framework

Gets or sets the target framework: net10.0 (the default) or net11.0.

Syntax

Property Value

Type: string

Name

Gets or sets the solution name. It is also the root namespace unless NewCommand.Namespace is set.

Syntax

Property Value

Type: string

Namespace

Gets or sets the root namespace for the projects. Defaults to NewCommand.Name.

Syntax

Property Value

Type: string

NoApi

Gets or sets whether to leave out the Api project and its tests.

Syntax

Property Value

Type: bool

NoMessageBus

Gets or sets whether to leave out the MessageBus.Core, MessageBus.Dispatch, and MessageBus.Runtime projects.

Syntax

Property Value

Type: bool

NoRuntime

Gets or sets whether to leave out only the MessageBus.Runtime project.

Syntax

Property Value

Type: bool

OutputDirectory

Gets or sets the folder to create the solution in. Defaults to ./{Name}.

Syntax

Property Value

Type: string

WebJob

Gets or sets whether to add Azure WebJob publish settings to the MessageBus.Runtime project.

Syntax

Property Value

Type: bool

Methods

CheckMSBuildRegistered Inherited

Inherited from CloudNimble.EasyAF.Tools.Commands.EasyAFBaseCommand
Ensures MSBuild is registered with the latest available version.

Syntax

ConfigureDirectoryBuildProps Inherited

Inherited from CloudNimble.EasyAF.Tools.Commands.EasyAFBaseCommand
Configures Directory.Build.props with EasyAF namespace, UserSecretsId, and analyzer references using MSBuildProjectManager.

Syntax

Parameters

ConfigureProjectTypes Inherited

Inherited from CloudNimble.EasyAF.Tools.Commands.EasyAFBaseCommand
Discovers and configures project types and namespace for all projects in the current directory and subdirectories.

Syntax

Parameters

DetectCommonNamespace Inherited

Inherited from CloudNimble.EasyAF.Tools.Commands.EasyAFBaseCommand
Detects the common namespace from existing projects.

Syntax

Parameters

Returns

Type: string The detected common namespace, or null if none found.

DetermineProjectType Inherited

Inherited from CloudNimble.EasyAF.Tools.Commands.EasyAFBaseCommand
Determines the EasyAFProjectType based on the project file name and content.

Syntax

Parameters

Returns

Type: string The determined project type, or null if no supported type is detected.

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ExtractUserSecretsId Inherited

Inherited from CloudNimble.EasyAF.Tools.Commands.EasyAFBaseCommand
Extracts the UserSecretsId from a project file using MSBuild evaluation. This will properly evaluate the project with all imports including Directory.Build.props.

Syntax

Parameters

Returns

Type: string The UserSecretsId if found, otherwise null.

ExtractUserSecretsIdFromDataProject Inherited

Inherited from CloudNimble.EasyAF.Tools.Commands.EasyAFBaseCommand
Extracts the UserSecretsId from the data project folder.

Syntax

Parameters

Returns

Type: string The UserSecretsId if found, otherwise null.

ExtractUserSecretsIdFromDirectoryBuildProps Inherited

Inherited from CloudNimble.EasyAF.Tools.Commands.EasyAFBaseCommand
Extracts the UserSecretsId from Directory.Build.props in the current directory.

Syntax

Returns

Type: string The UserSecretsId if found, otherwise null.

FindCommonPrefix Inherited

Inherited from CloudNimble.EasyAF.Tools.Commands.EasyAFBaseCommand
Finds the common prefix among a list of strings.

Syntax

Parameters

Returns

Type: string The common prefix.

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

OnExecuteAsync

Creates the solution.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<int> 0 when the solution was created; otherwise 1.

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

SetProjectType Inherited

Inherited from CloudNimble.EasyAF.Tools.Commands.EasyAFBaseCommand
Adds or updates the EasyAFProjectType property in a project file using MSBuildProjectManager.

Syntax

Parameters

SetUserSecretAsync Inherited

Inherited from CloudNimble.EasyAF.Tools.Commands.EasyAFBaseCommand
Sets a user secret value using the official dotnet user-secrets CLI tool.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?