GetStringPropertyPrecision Method
Finds and returns the maximum string length allowed for a specified property.
Namespace: Microsoft.CommerceServer.Runtime
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Shared Function GetStringPropertyPrecision ( _
orderContext As OrderContext, _
propertyClassType As Type, _
propertyName As String _
) As Integer
'Usage
Dim orderContext As OrderContext
Dim propertyClassType As Type
Dim propertyName As String
Dim returnValue As Integer
returnValue = StorageUtilities.GetStringPropertyPrecision(orderContext, _
propertyClassType, propertyName)
public static int GetStringPropertyPrecision(
OrderContext orderContext,
Type propertyClassType,
string propertyName
)
public:
static int GetStringPropertyPrecision(
OrderContext^ orderContext,
Type^ propertyClassType,
String^ propertyName
)
public static function GetStringPropertyPrecision(
orderContext : OrderContext,
propertyClassType : Type,
propertyName : String
) : int
Parameters
- orderContext
Type: Microsoft.CommerceServer.Runtime.Orders..::.OrderContext
OrderContext representing the system in which to perform the check.
- propertyClassType
Type: System..::.Type
The System.Type of the class to which the property belongs. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
- propertyName
Type: System..::.String
The name of the property. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
Return Value
Type: System..::.Int32
The string column precision if the string is mapped to a column, or zero if the property is not a string or is not mapped.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The propertyClassType or propertyName parameter is nullNothingnullptra null reference (Nothing in Visual Basic). |
Remarks
Returns the maximum string length allowed for a specified property. Classes derived from OrderGroup use the string column precision information for the PurchaseOrder class (or any user-defined mapped class derived from PurchaseOrder).
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.