ArcFM Engine Developer Guide
SetValueAllowingTruncateWithLog<TProperty> Method


The property to set a value
The new value of the string
Try to set a string value if too long log an error message and truncate
Syntax
'Declaration
 
Public Sub SetValueAllowingTruncateWithLog(Of TProperty)( _
   ByVal propertyLambda As Expression(Of Func(Of T,TProperty)), _
   ByVal newValue As String _
) 
'Usage
 
Dim instance As ResponderObjectBaseGeneric(Of T)
Dim propertyLambda As Expression(Of Func(Of T,TProperty))
Dim newValue As String
 
instance.SetValueAllowingTruncateWithLog(Of TProperty)(propertyLambda, newValue)
public void SetValueAllowingTruncateWithLog<TProperty>( 
   Expression<Func<T,TProperty>> propertyLambda,
   string newValue
)

Parameters

propertyLambda
newValue
The new value of the string

Type Parameters

TProperty
The property to set a value
Example
var object = new AlertsObject(row); object.SetValueAllowingTruncateWithLog(i => i.property, "SomeString"); Assert.That(object.property, Is.EqualTo("SomeString")); var object2 = new AlertsObject(row); object2.SetValueAllowingTruncateWithLog(i=>i.property, new string('m', 500)); // error loggged here Assert.That(object2.property, Is.EqualTo(new string('m', 200)));
Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

ResponderObjectBaseGeneric<T> Class
ResponderObjectBaseGeneric<T> Members

 

 


Send Comment