Show / Hide Table of Contents

Struct LazyFormatString

Formatted string that evaluated lazily and doesn't use params.

Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Sttz.Tweener.Core
Assembly: cs.temp.dll.dll
Syntax
public struct LazyFormatString
Remarks

Formatted strings are nice for debug messages but both the formatting and the params method allocate memory. This helper struct allows to defer this allocation until it's necessary, to avoid the allocation for e.g. debug messages that are not logged due to the current log level.

Constructors

LazyFormatString(String)

Declaration
public LazyFormatString(string format)
Parameters
Type Name Description
System.String format

LazyFormatString(String, Object)

Declaration
public LazyFormatString(string format, object arg1)
Parameters
Type Name Description
System.String format
System.Object arg1

LazyFormatString(String, Object, Object)

Declaration
public LazyFormatString(string format, object arg1, object arg2)
Parameters
Type Name Description
System.String format
System.Object arg1
System.Object arg2

LazyFormatString(String, Object, Object, Object)

Declaration
public LazyFormatString(string format, object arg1, object arg2, object arg3)
Parameters
Type Name Description
System.String format
System.Object arg1
System.Object arg2
System.Object arg3

LazyFormatString(String, Object, Object, Object, Object)

Declaration
public LazyFormatString(string format, object arg1, object arg2, object arg3, object arg4)
Parameters
Type Name Description
System.String format
System.Object arg1
System.Object arg2
System.Object arg3
System.Object arg4

LazyFormatString(String, Object, Object, Object, Object, Object)

Declaration
public LazyFormatString(string format, object arg1, object arg2, object arg3, object arg4, object arg5)
Parameters
Type Name Description
System.String format
System.Object arg1
System.Object arg2
System.Object arg3
System.Object arg4
System.Object arg5

Fields

arg1

Declaration
public object arg1
Field Value
Type Description
System.Object

arg2

Declaration
public object arg2
Field Value
Type Description
System.Object

arg3

Declaration
public object arg3
Field Value
Type Description
System.Object

arg4

Declaration
public object arg4
Field Value
Type Description
System.Object

arg5

Declaration
public object arg5
Field Value
Type Description
System.Object

args

Declaration
public short args
Field Value
Type Description
System.Int16

format

Declaration
public string format
Field Value
Type Description
System.String

Methods

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.ValueType.ToString()

Operators

Implicit(String to LazyFormatString)

Declaration
public static implicit operator LazyFormatString(string format)
Parameters
Type Name Description
System.String format
Returns
Type Description
LazyFormatString
Back to top © 2018 Adrian Stutz