protected IEnumerable <uSyncDependency> GetPropertyDependencies(JObject value,
                                                                        IContentType docType, DependencyFlags flags)
        {
            var dependencies = new List <uSyncDependency>();

            foreach (var propertyType in docType.CompositionPropertyTypes)
            {
                var propertyValue = value[propertyType.Alias];
                if (propertyValue == null)
                {
                    continue;
                }

                var dataType = dataTypeService.GetDataType(propertyType.DataTypeKey);
                if (dataType == null)
                {
                    continue;
                }

                dependencies.AddRange(SyncValueMapperFactory.GetDependencies(propertyValue, dataType.EditorAlias, flags));
            }

            return(dependencies);
        }
        /// <summary>
        ///  get the export value for the properties used in this JObject
        /// </summary>
        protected JObject GetExportProperties(JObject item, IContentType docType)
        {
            foreach (var property in docType.CompositionPropertyTypes)
            {
                if (item.ContainsKey(property.Alias))
                {
                    var value = item[property.Alias];
                    if (value != null)
                    {
                        var mappedVal = SyncValueMapperFactory.GetExportValue(value, property.PropertyEditorAlias);
                        if (mappedVal.DetectIsJson())
                        {
                            item[property.Alias] = JToken.Parse(mappedVal);
                        }
                        else
                        {
                            item[property.Alias] = mappedVal;
                        }
                    }
                }
            }

            return(item);
        }