Ejemplo n.º 1
0
        public static CategoryResult From(CategoryData item, ISessionAwareCoreService client, string currentUserId)
        {
            var result = new CategoryResult
            {
                Description = TextEntry.From(item.Description, Resources.LabelDescription),
                XmlName = TextEntry.From(item.XmlName, Resources.LabelXmlName)
            };

            if (item.UseForNavigation == false)
            {
                result.Publishable = TextEntry.From(Resources.CannotBePublished, Resources.LabelPublishable);
            }

            if (item.UseForIdentification == true)
            {
                result.UseForIdentification = TextEntry.From(Resources.Yes, Resources.LabelUseForIdentification);
            }

            result.LinkedSchema = LinkEntry.From(item.KeywordMetadataSchema, Resources.LabelLinkedSchema, currentUserId);

            AddCommonProperties(item, result);
            AddPropertiesForRepositoryLocalObject(item, result, currentUserId);
            return result;
        }
Ejemplo n.º 2
0
        public static CategoryResult From(CategoryData item, ISessionAwareCoreService client, string currentUserId)
        {
            var result = new CategoryResult
            {
                Description = TextEntry.From(item.Description, Resources.LabelDescription),
                XmlName     = TextEntry.From(item.XmlName, Resources.LabelXmlName)
            };

            if (item.UseForNavigation == false)
            {
                result.Publishable = TextEntry.From(Resources.CannotBePublished, Resources.LabelPublishable);
            }

            if (item.UseForIdentification == true)
            {
                result.UseForIdentification = TextEntry.From(Resources.Yes, Resources.LabelUseForIdentification);
            }

            result.LinkedSchema = LinkEntry.From(item.KeywordMetadataSchema, Resources.LabelLinkedSchema, currentUserId);

            AddCommonProperties(item, result);
            AddPropertiesForRepositoryLocalObject(item, result, currentUserId);
            return(result);
        }