Aqueduct.SitecoreLib.DataAccess.ValueResolvers.DomainEntityValueResolver.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)
        {
            Logger.LogDebugMessage(String.Format("DomainEntityValueResolver: Resolving '{0}' to type {1}", rawValue, propertyType.FullName));
            if (!string.IsNullOrEmpty(rawValue))
            {
                var repo = new DomainEntityRepository();
                return repo.GetEntityOfType(propertyType, new Guid(rawValue));
            }
            return null;
        }