Aqueduct.SitecoreLib.DataAccess.ValueResolvers.ValuesListResolver.ResolveEntityPropertyValue C# (CSharp) Method

ResolveEntityPropertyValue() public method

public ResolveEntityPropertyValue ( string rawValue, Type propertyType ) : object
rawValue string
propertyType System.Type
return object
        public object ResolveEntityPropertyValue(string rawValue, Type propertyType)
        {
            IList list = CreateList(propertyType);
            if (string.IsNullOrEmpty(rawValue))
                return list;

            var delimiter = new [] { SitecoreDataAccess.Settings.ValueDelimiter };
            string[] items = rawValue.Split(delimiter, StringSplitOptions.RemoveEmptyEntries);

            Type listArgumentType = ResolverHelper.GetArgumentType(propertyType);
            IValueResolver resolver = GetInnerResolver(listArgumentType);
            foreach (string item in items)
            {
                list.Add(resolver.ResolveEntityPropertyValue(item, listArgumentType));
            }

            return list;
            
        }