Simpl.Serialization.FieldDescriptor.AddLeafNodeToCollection C# (CSharp) Method

AddLeafNodeToCollection() public method

public AddLeafNodeToCollection ( object root, string value, TranslationContext translationContext ) : void
root object
value string
translationContext Simpl.Serialization.Context.TranslationContext
return void
        public void AddLeafNodeToCollection(object root, string value, TranslationContext translationContext)
        {
            if(String.IsNullOrEmpty(value))
            {
                return;
            }

            if(ScalarType != null)
            {
                Object typeConvertedValue = ScalarType.GetInstance(value, dataFormat, translationContext);

                if(typeConvertedValue != null)
                {
                    IList collection = (IList) AutomaticLazyGetCollectionOrMap(root);
                    collection.Add(typeConvertedValue);
                }
            }
        }