I am making a batch task for trimming segments. Is it possible to check the character limit if any for a segment?
I am making a batch task for trimming segments. Is it possible to check the character limit if any for a segment?
I have found the solution.
Here is some useful code:
public static int GetCharacterRestriction (ISegmentPair pair) => int.Parse(pair.Target.ParentParagraphUnit.Properties.Contexts.Contexts.Where
(v => v.GetMetaData("length_type") == "chars" && v.GetMetaData("length_max_value") != null)
.Select(v => v.GetMetaData("length_max_value")).FirstOrDefault() ?? "0");
Hello,
I have been looking for this information for a long time router login, I was very surprised when I found it here. The code works.
Thank.
Hello,
I have been looking for this information for a long time router login, I was very surprised when I found it here. The code works.
Thank.