C# Class Zombie.Safe

The Safe class provide static methods to read items from a QBFC object.
Datei anzeigen Open project: pkpjpm/Zombie Class Usage Examples

Public Methods

Method Description
Cents ( float f ) : double
CleanApostrophes ( string s ) : string
DecimalAsCents ( decimal d ) : double
DecimalAsMils ( decimal d ) : double
FullName ( IQBBaseRef obj ) : string

Returns a name reference (Full Name) in a way that will not explode. Returns a zero length string in the event of failure

GetNullDateTimeValue ( ) : System.DateTime

The beginning of the COM Epoch is used to represent no date

LimitedString ( string val, int maxLength ) : string

Silent truncation function when data loss is acceptable

LimitedString ( string val, int maxLength, string reference ) : string

SDK updates treat truncation as an error. So it is important to trim values that are found to be too long

ListID ( IQBBaseRef obj ) : string

Returns an ID reference (ListID) in a way that will not explode. Returns a zero length string in the event of failure

SafeString ( object obj ) : string
Value ( IQBDateTimeType dt ) : System.DateTime
Value ( IQBDateType dt ) : System.DateTime
Value ( IQBBoolType bl ) : bool
Value ( IQBAmountType amt ) : decimal
Value ( IQBFloatType val ) : decimal
Value ( IQBPercentType pct ) : decimal
Value ( IQBPriceType prc ) : decimal
Value ( IQBQuanType quan ) : decimal
Value ( IQBIntType i ) : int
Value ( IQBIDType ID ) : string
Value ( IQBStringType obj ) : string

Returns a valid non-exploding string from an IQBStringType object

Method Details

Cents() public static method

public static Cents ( float f ) : double
f float
return double

CleanApostrophes() public static method

public static CleanApostrophes ( string s ) : string
s string
return string

DecimalAsCents() public static method

public static DecimalAsCents ( decimal d ) : double
d decimal
return double

DecimalAsMils() public static method

public static DecimalAsMils ( decimal d ) : double
d decimal
return double

FullName() public static method

Returns a name reference (Full Name) in a way that will not explode. Returns a zero length string in the event of failure
public static FullName ( IQBBaseRef obj ) : string
obj IQBBaseRef the reference to read
return string

GetNullDateTimeValue() public static method

The beginning of the COM Epoch is used to represent no date
public static GetNullDateTimeValue ( ) : System.DateTime
return System.DateTime

LimitedString() public static method

Silent truncation function when data loss is acceptable
public static LimitedString ( string val, int maxLength ) : string
val string Original string value
maxLength int maximum allowed lenght
return string

LimitedString() public static method

SDK updates treat truncation as an error. So it is important to trim values that are found to be too long
public static LimitedString ( string val, int maxLength, string reference ) : string
val string
maxLength int
reference string
return string

ListID() public static method

Returns an ID reference (ListID) in a way that will not explode. Returns a zero length string in the event of failure
public static ListID ( IQBBaseRef obj ) : string
obj IQBBaseRef The reference to read
return string

SafeString() public static method

public static SafeString ( object obj ) : string
obj object
return string

Value() public static method

public static Value ( IQBDateTimeType dt ) : System.DateTime
dt IQBDateTimeType
return System.DateTime

Value() public static method

public static Value ( IQBDateType dt ) : System.DateTime
dt IQBDateType
return System.DateTime

Value() public static method

public static Value ( IQBBoolType bl ) : bool
bl IQBBoolType
return bool

Value() public static method

public static Value ( IQBAmountType amt ) : decimal
amt IQBAmountType
return decimal

Value() public static method

public static Value ( IQBFloatType val ) : decimal
val IQBFloatType
return decimal

Value() public static method

public static Value ( IQBPercentType pct ) : decimal
pct IQBPercentType
return decimal

Value() public static method

public static Value ( IQBPriceType prc ) : decimal
prc IQBPriceType
return decimal

Value() public static method

public static Value ( IQBQuanType quan ) : decimal
quan IQBQuanType
return decimal

Value() public static method

public static Value ( IQBIntType i ) : int
i IQBIntType
return int

Value() public static method

public static Value ( IQBIDType ID ) : string
ID IQBIDType
return string

Value() public static method

Returns a valid non-exploding string from an IQBStringType object
public static Value ( IQBStringType obj ) : string
obj IQBStringType The object to be translated
return string