コード例 #1
0
        protected uSyncDependency CalcDocTypeDependency(IContentBase item, DependencyFlags flags)
        {
            if (item.ContentType == null)
            {
                return(null);
            }


            var entity = entityService.GetKey(item.ContentTypeId, contentTypeObjectType);

            if (entity.Success)
            {
                var udi = Udi.Create(contentTypeObjectType.GetUdiType(), entity.Result);

                return(new uSyncDependency()
                {
                    Name = item.Name,
                    Udi = udi,
                    Order = DependencyOrders.ContentTypes,
                    Flags = flags & ~DependencyFlags.IncludeAncestors,
                    Level = item.Level
                });
            }

            return(null);
        }