Class AssetLayoutBuilder<TResult, TBuilder>
An abstract builder to help build Article parameters for implementing classes.
Inheritance
Namespace: HuduAPI.Endpoints.Parameters.AbstractBases
Assembly: HuduAPI.dll
Syntax
public abstract class AssetLayoutBuilder<TResult, TBuilder>
where TResult : AssetLayout where TBuilder : AssetLayoutBuilder<TResult, TBuilder>
Type Parameters
| Name | Description |
|---|---|
| TResult | The type of the paramater to build. |
| TBuilder | The type of the builder that is inherting this base class. |
Fields
_active
Declaration
protected Boolean _active
Field Value
| Type | Description |
|---|---|
| Boolean |
_color
Declaration
protected Color _color
Field Value
| Type | Description |
|---|---|
| System.Drawing.Color |
_fields
Declaration
protected List<AssetLayoutField> _fields
Field Value
| Type | Description |
|---|---|
| List<AssetLayoutField> |
_icon
Declaration
protected string _icon
Field Value
| Type | Description |
|---|---|
| System.String |
_iconColor
Declaration
protected Color _iconColor
Field Value
| Type | Description |
|---|---|
| System.Drawing.Color |
_includeComments
Declaration
protected bool _includeComments
Field Value
| Type | Description |
|---|---|
| System.Boolean |
_includeFiles
Declaration
protected bool _includeFiles
Field Value
| Type | Description |
|---|---|
| System.Boolean |
_includePasswords
Declaration
protected bool _includePasswords
Field Value
| Type | Description |
|---|---|
| System.Boolean |
_includePhotos
Declaration
protected bool _includePhotos
Field Value
| Type | Description |
|---|---|
| System.Boolean |
_name
Declaration
protected string _name
Field Value
| Type | Description |
|---|---|
| System.String |
_passwordTypes
Declaration
protected string _passwordTypes
Field Value
| Type | Description |
|---|---|
| System.String |
Methods
Build()
Build a class of type TResult with all the defined values
Declaration
public abstract TResult Build()
Returns
| Type | Description |
|---|---|
| TResult | Returns a |
WithActive(Boolean)
Determines whether the Asset Layout should be marked as active.
Declaration
public TBuilder WithActive(Boolean active)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | active | if set to |
Returns
| Type | Description |
|---|---|
| TBuilder |
WithAssetLayoutFieldsItem(AssetLayoutField)
Adds a new AssetLayoutField to the AssetLayoutFields List that is to be associated with the asset_layout
Declaration
public TBuilder WithAssetLayoutFieldsItem(AssetLayoutField item)
Parameters
| Type | Name | Description |
|---|---|---|
| AssetLayoutField | item | A single asset_layout field |
Returns
| Type | Description |
|---|---|
| TBuilder | A generic Builder Object for type |
WithColor(Color)
Set a value for the color of the icon background
Declaration
public TBuilder WithColor(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Color | color | The color. |
Returns
| Type | Description |
|---|---|
| TBuilder | A generic Builder Object for type |
WithFields(List<AssetLayoutField>)
Set a list of AssetLayoutFields to be associated with the asset_layout
Declaration
public TBuilder WithFields(List<AssetLayoutField> fields)
Parameters
| Type | Name | Description |
|---|---|---|
| List<AssetLayoutField> | fields | A List of fields. |
Returns
| Type | Description |
|---|---|
| TBuilder | A generic Builder Object for type |
WithIcon(String)
Set a value for icon to be associated with the asset_layout
Declaration
public TBuilder WithIcon(string icon)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | icon | The icon. |
Returns
| Type | Description |
|---|---|
| TBuilder | A generic Builder Object for type |
WithIconColor(Color)
Set a value for iconColor
Declaration
public TBuilder WithIconColor(Color iconColor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Color | iconColor | Color of the icon. |
Returns
| Type | Description |
|---|---|
| TBuilder | A generic Builder Object for type |
WithIncludeComments(Boolean)
Set a value for includeComments
Declaration
public TBuilder WithIncludeComments(bool includeComments)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | includeComments | if set to |
Returns
| Type | Description |
|---|---|
| TBuilder | A generic Builder Object for type |
WithIncludeFiles(Boolean)
Set a value for includeFiles
Declaration
public TBuilder WithIncludeFiles(bool includeFiles)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | includeFiles | if set to |
Returns
| Type | Description |
|---|---|
| TBuilder | A generic Builder Object for type |
WithIncludePasswords(Boolean)
Set a value for includePasswords
Declaration
public TBuilder WithIncludePasswords(bool includePasswords)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | includePasswords | if set to |
Returns
| Type | Description |
|---|---|
| TBuilder | A generic Builder Object for type |
WithIncludePhotos(Boolean)
Set a value for includePhotos
Declaration
public TBuilder WithIncludePhotos(bool includePhotos)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | includePhotos | if set to |
Returns
| Type | Description |
|---|---|
| TBuilder | A generic Builder Object for type |
WithName(String)
Set a value for name
Declaration
public TBuilder WithName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name. |
Returns
| Type | Description |
|---|---|
| TBuilder | A generic Builder Object for type |
WithPasswordTypes(String)
Set a value for passwordTypes
Declaration
public TBuilder WithPasswordTypes(string passwordTypes)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | passwordTypes | The password types. |
Returns
| Type | Description |
|---|---|
| TBuilder | A generic Builder Object for type |