Aqueduct.SitecoreLib.DataAccess.ValueResolvers.FileValueResolver.ResolveEntityPropertyValue C# (CSharp) Метод

ResolveEntityPropertyValue() публичный Метод

public ResolveEntityPropertyValue ( string rawValue, Type propertyType ) : object
rawValue string
propertyType System.Type
Результат object
        public object ResolveEntityPropertyValue(string rawValue, Type propertyType)
        {
            var result = new File();
            if (rawValue.IsNotEmpty())
            {
                Match imageMatch = Regex.Match(rawValue, RegexPattern);
                if (imageMatch.Success && imageMatch.Groups["mediaid"].Value.IsGuid())
                {
                    Guid imageId = new Guid(imageMatch.Groups["mediaid"].Value);
                    ReadOnlyRepository repository = new ReadOnlyRepository();
                    File image = repository.Get<File>(imageId);
                    result = image ?? new File();

                }
            }
            return result;
        }