Show / Hide Table of Contents

Class Int32Argument

Argument that has an int value.

Inheritance
object
Argument<int>
Int32Argument
Implements
IArgument
IInt32Argument
Inherited Members
Argument<int>.OnInitialize()
Argument<int>.Description
Argument<int>.FriendlyName
Argument<int>.Value
Argument<int>.HasValue
Argument<int>.Name
Argument<int>.Alias
Argument<int>.HasAlias
Argument<int>.IsPositionalSource
Argument<int>.IsRequired
Argument<int>.AllowEmptyValue
Argument<int>.Validate()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Benday.CommandsFramework
Assembly: Benday.CommandsFramework.dll
Syntax
public class Int32Argument : Argument<int>, IArgument, IInt32Argument

Constructors

| Edit this page View Source

Int32Argument(string)

Declaration
public Int32Argument(string name)
Parameters
Type Name Description
string name

Properties

| Edit this page View Source

DataType

DataType for the argument

Declaration
public override ArgumentDataType DataType { get; }
Property Value
Type Description
ArgumentDataType
Overrides
Argument<int>.DataType
| Edit this page View Source

ValueAsInt32

Value as int

Declaration
public int ValueAsInt32 { get; }
Property Value
Type Description
int

Methods

| Edit this page View Source

GetDefaultValue()

Returns the default value

Declaration
protected override int GetDefaultValue()
Returns
Type Description
int

Default value for the argument

Overrides
Argument<int>.GetDefaultValue()
| Edit this page View Source

TrySetValue(string)

Try to convert the input value to int and then set it as the value for the argument

Declaration
public override bool TrySetValue(string input)
Parameters
Type Name Description
string input

Input value as string

Returns
Type Description
bool

True if the value could be converted and set

Overrides
Argument<int>.TrySetValue(string)

Implements

IArgument
IInt32Argument

Extension Methods

ExtensionMethods.AllowEmptyValue<T>(Argument<T>, bool)
ExtensionMethods.AsNotRequired<T>(Argument<T>)
ExtensionMethods.AsRequired<T>(Argument<T>)
ExtensionMethods.ExistenceOptional<T>(Argument<T>)
ExtensionMethods.FromPositionalArgument<T>(Argument<T>, int)
ExtensionMethods.MustExist<T>(Argument<T>)
ExtensionMethods.WithAlias<T>(Argument<T>, string)
ExtensionMethods.WithDefaultValue<T>(Argument<T>, T)
ExtensionMethods.WithDescription<T>(Argument<T>, string)
ExtensionMethods.WithFriendlyName<T>(Argument<T>, string)
  • Edit this page
  • View Source
In this article
Back to top Copyright © www.benday.com | info@benday.com