C# 클래스 Gammtek.Conduit.Text.Formatting.VerboseFormatInfoBase

Base class for all verbose format providers. Implements basic functionality and defines mandatory members that would be overridden or implemented by derived classes in order to provide specific functionality applicable to format strings representing instances of particular data types.
상속: IFormatProvider, ICustomFormatter, ICloneable
파일 보기 프로젝트 열기: ME3Explorer/ME3Explorer 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AppendFriendlyTypeName bool
AppendInstanceTypeName bool
DecIndentationLevel void
Format bool
Format void
FormatLinePrefix bool
GetCurrentLineLength int
GetInstanceTypeName string
IncIndentationLevel void
IsFormatApplicable bool
IsIndentationLevelOccupied bool

공개 메소드들

메소드 설명
Clone ( ) : object

Implement in derived classes to perform deep copying of the current object.

CombineMaximumFormattedLength ( int length ) : int

Combines maximum formatted string length from this instance with given length and sets new maximum length for this instance.

Format ( object arg ) : string

Converts the value of a specified object to an equivalent string representation using default format and culture-specific formatting information.

Format ( string format, object arg, IFormatProvider formatProvider ) : string

Converts the value of a specified object to an equivalent string representation using specified format and culture-specific formatting information.

GetFormat ( Type formatType ) : object

Returns an object that provides formatting services for the specified type.

ToString ( ) : string

Converts current instance to user friendly string using simple formatter to format the string.

VerboseFormatInfoBase ( ) : System

Default constructor.

VerboseFormatInfoBase ( VerboseFormatInfoBase other ) : System

Copy constructor. Used to build format providers that share common property values with some existing instance.

보호된 메소드들

메소드 설명
GetInstanceType ( object instance ) : Type

Gets type of the given instance if available either from the instance itself or from this format provider.

PopCurrentObject ( ) : void

Pops object from the visited instances stack. Each call to this method must be matched by a single call to PushCurrentInstance method which returned true.

PushCurrentObject ( object obj ) : bool

Checks whether specified object is already present in the stack containing visited instances and, if it is not, pushes the object to the stack. Otherwise method fails and signals the caller that specified object has already been visited in current line of references.

비공개 메소드들

메소드 설명
AppendFriendlyTypeName ( Type type, object instance, StringBuilder sb, int &maxLength ) : bool

Formats user friendly representation of the name of the given type. Override in derived classes to implement specific friendly names for known types handled by derived classes. Make sure that overridden implementations call base class implementation in case that they cannot resolve type name.

AppendInstanceTypeName ( object instance, StringBuilder sb, int &maxLength ) : bool

Appends user friendly name of the type of the given instance if available either from the instance itself or from this format provider.

DecIndentationLevel ( ) : void

Reduces indentation level by one.

Format ( StringBuilder sb, string format, object arg, IFormatProvider formatProvider, int &maxLength ) : bool

Converts the value of a specified object to an equivalent string representation using specified format and culture-specific formatting information.

Format ( StringBuilder sb, string format, object arg, IFormatProvider formatProvider ) : void

Converts the value of a specified object to an equivalent string representation using specified format and culture-specific formatting information.

FormatLinePrefix ( StringBuilder sb, bool firstValueFollows, bool lastValueFollows, bool skipRightMostIndentationString, int padLineToLength, int &maxLength ) : bool

Appends all fields that should be placed before next contained value is appended to the output. In single-lined formats that will only be the field delimiter. In multi-lined formats that may include indentation strings.

GetCurrentLineLength ( StringBuilder sb ) : int

Gets length of the last line in the given string builder. Use this method to pad lines depending on required length.

GetInstanceTypeName ( object instance ) : string

Gets user friendly name of the type of the instance if available either from the instance itself or from this format provider.

IncIndentationLevel ( bool moreItemsToFollow ) : void

Increases indentation level by one.

IsFormatApplicable ( Type dataType ) : bool

Gets value indicating whether current format provider is applicable to format strings that represent instances of given data type. Override in derived classes to return appropriate value.

IsIndentationLevelOccupied ( int level ) : bool

Gets value indicating whether at specified indentation level there are more items to follow or last printed item on that indentation level is overall last item on that indentation level.

메소드 상세

Clone() 공개 추상적인 메소드

Implement in derived classes to perform deep copying of the current object.
public abstract Clone ( ) : object
리턴 object

CombineMaximumFormattedLength() 공개 메소드

Combines maximum formatted string length from this instance with given length and sets new maximum length for this instance.
public CombineMaximumFormattedLength ( int length ) : int
length int /// Length with which maximum allowed length of the string created by this formatter is combined; /// negative value indicates infinite allowed length. ///
리턴 int

Format() 공개 메소드

Converts the value of a specified object to an equivalent string representation using default format and culture-specific formatting information.
public Format ( object arg ) : string
arg object An object to format.
리턴 string

Format() 공개 메소드

Converts the value of a specified object to an equivalent string representation using specified format and culture-specific formatting information.
public Format ( string format, object arg, IFormatProvider formatProvider ) : string
format string A format string containing formatting specifications.
arg object An object to format.
formatProvider IFormatProvider An object that supplies format information about the current instance.
리턴 string

GetFormat() 공개 메소드

Returns an object that provides formatting services for the specified type.
public GetFormat ( Type formatType ) : object
formatType System.Type An object that specifies the type of format object to return.
리턴 object

GetInstanceType() 보호된 메소드

Gets type of the given instance if available either from the instance itself or from this format provider.
protected GetInstanceType ( object instance ) : Type
instance object Instance for which data type is determined.
리턴 System.Type

PopCurrentObject() 보호된 메소드

Pops object from the visited instances stack. Each call to this method must be matched by a single call to PushCurrentInstance method which returned true.
protected PopCurrentObject ( ) : void
리턴 void

PushCurrentObject() 보호된 메소드

Checks whether specified object is already present in the stack containing visited instances and, if it is not, pushes the object to the stack. Otherwise method fails and signals the caller that specified object has already been visited in current line of references.
protected PushCurrentObject ( object obj ) : bool
obj object Object which is currently being processed.
리턴 bool

ToString() 공개 메소드

Converts current instance to user friendly string using simple formatter to format the string.
public ToString ( ) : string
리턴 string

VerboseFormatInfoBase() 공개 메소드

Default constructor.
public VerboseFormatInfoBase ( ) : System
리턴 System

VerboseFormatInfoBase() 공개 메소드

Copy constructor. Used to build format providers that share common property values with some existing instance.
public VerboseFormatInfoBase ( VerboseFormatInfoBase other ) : System
other VerboseFormatInfoBase Instance from which common property values will be copied.
리턴 System