protected override object GetValue(Document document, string documentName, PropertyInfo propertyInfo)
        {
            var date = document.GetDate(GetFieldName(documentName, propertyInfo));

            if (date != null)
                return date.Value;

            if (propertyInfo.PropertyType == typeof (DateTime))
                return DateTime.MinValue;

            return null;
        }
 protected override object GetValue(Document document, string documentName, PropertyInfo propertyInfo)
 {
     return document.GetStructuredText(GetFieldName(documentName, propertyInfo))
            ?? new StructuredText(new List<StructuredText.Block>());
 }
 protected override object GetValue(Document document, string documentName, PropertyInfo propertyInfo)
 {
     return document.GetSliceZone(GetFieldName(documentName, propertyInfo)).Slices;
 }
 public String Resolve(Document doc)
 {
     return Resolve(doc.AsDocumentLink());
 }
示例#5
0
 public string ResolveLink(prismic.Document document)
 {
     return(this.linkResolver.Resolve(document));
 }
示例#6
0
 public PrismicDocument(PrismicContext ctx, prismic.Document document) : base(ctx)
 {
     this.document = document;
 }
 protected override object GetValue(Document document, string documentName, PropertyInfo property)
 {
     return document.Uid;
 }