44using System . Collections . Generic ;
55using System . Linq ;
66using System . Text . RegularExpressions ;
7- using Yagasoft . AutoNumbering . Plugins . Helpers ;
8- using Yagasoft . Libraries . Common ;
97using Microsoft . Xrm . Sdk ;
108using Microsoft . Xrm . Sdk . Client ;
9+ using Yagasoft . AutoNumbering . Plugins . Helpers ;
10+ using Yagasoft . Libraries . Common ;
1111
1212#endregion
1313
1414namespace Yagasoft . AutoNumbering . Plugins . BLL
1515{
1616 /// <summary>
1717 /// Author: Ahmed Elsawalhy<br />
18- /// Version: 2.1.1
18+ /// Version: 2.1.2
1919 /// </summary>
2020 [ Log ]
2121 internal class AutoNumberingEngine
@@ -37,7 +37,7 @@ internal class Result
3737 private readonly IEnumerable < string > inputParams ;
3838
3939 private int padding ;
40-
40+
4141 private readonly Guid orgId ;
4242 private readonly bool isUpdate ;
4343 private AutoNumbering updatedAutoNumbering ;
@@ -370,7 +370,7 @@ internal string ParseParamVariables(int paramIndex)
370370
371371 private string ParseAttributeVariables ( string rawString )
372372 {
373- return CrmParser . Parse ( rawString , image , service , this , orgId , typeof ( Constructs ) ) ;
373+ return CrmParser . Interpreter . Parse ( rawString , [ typeof ( Constructs ) ] ) . Evaluate ( service , image , this ) ;
374374 }
375375
376376 private string ParseDateVariables ( string rawString )
@@ -385,7 +385,7 @@ private string ParseDateVariables(string rawString)
385385 }
386386
387387 var rawVariable = match . Groups [ 1 ] . Value ;
388- rawVariable = CrmParser . Parse ( rawVariable , image , service , this , orgId , typeof ( Constructs ) ) ;
388+ rawVariable = CrmParser . Interpreter . Parse ( rawVariable , [ typeof ( Constructs ) ] ) . Evaluate ( service , image , this ) ;
389389
390390 var date = DateTime . UtcNow . ConvertToCrmUserTimeZone ( service , autoNumberConfig . Owner . Id ) ;
391391 return string . Format ( "{0:" + rawVariable + "}" , date ) ;
0 commit comments