Exemplo n.º 1
0
 public Paragraph Create(IFieldSet fs)
 {
     return new Paragraph
     {
         BodyText = fs.Field("BodyText", fld => richTextHelper.ResolveRichText(fld.Value)) ?? string.Empty,
         SubTitle = fs.Field("SubTitle"),
     };
 }
Exemplo n.º 2
0
 public Paragraph Create(IFieldSet fs)
 {
     return(new Paragraph
     {
         BodyText = fs.Field("BodyText", fld => richTextHelper.ResolveRichText(fld.Value)) ?? string.Empty,
         SubTitle = fs.Field("SubTitle"),
     });
 }
        public T BuildSingleLink <T>(IFieldSet fields, T instance)
            where T : SingleLink
        {
            BuildLinkText(fields, instance);
            instance.HeadingTitle = fields.Field("Heading") ?? "";
            instance.Image        = fields.Image();

            string linkTitle = FindInHierarchy(fields, "LinkTitle");

            instance.Title = linkTitle ?? fields.Field("Heading");
            return(instance);
        }
Exemplo n.º 4
0
 public static string Image(this IFieldSet fields, string name = "Image")
 {
     return(fields.Field(name,
                         fld => fld.LinkedComponentValues
                         .Select(c => c.Multimedia.Url)
                         .FirstOrDefault()
                         ));
 }
Exemplo n.º 5
0
 public static string Field(this IFieldSet fields, string name)
 {
     return(fields.Field(name, fld => fld.Value));
 }
 public T BuildLinkText <T>(IFieldSet fields, T instance)
     where T : Link
 {
     instance.Title = fields.Field("LinkTitle");
     return(BuildLink(fields, instance));
 }