internal void ProcessEclStubComponent(Component eclStubComponent)
        {
            IContentLibraryContext        eclContext;
            IContentLibraryMultimediaItem eclItem = GetEclItem(eclStubComponent.Id, out eclContext);

            // This may look a bit unusual, but we have to ensure that ECL Item members are accessed *before* the ECL Context is disposed.
            using (eclContext)
            {
                eclStubComponent.EclId = eclItem.Id.ToString();

                string directLinkToPublished = eclItem.GetDirectLinkToPublished(null);
                eclStubComponent.Multimedia.Url = string.IsNullOrEmpty(directLinkToPublished) ? PublishBinaryContent(eclItem, eclStubComponent.Id) : directLinkToPublished;

                // Set additional ECL Item properties as ExtensionData on the ECL Stub Component.
                const string eclSectionName = "ECL";
                eclStubComponent.AddExtensionProperty(eclSectionName, "DisplayTypeId", eclItem.DisplayTypeId);
                eclStubComponent.AddExtensionProperty(eclSectionName, "MimeType", eclItem.MimeType);
                eclStubComponent.AddExtensionProperty(eclSectionName, "FileName", eclItem.Filename);
                eclStubComponent.AddExtensionProperty(eclSectionName, "TemplateFragment", eclItem.GetTemplateFragment(null));

                IFieldSet eclExternalMetadataFieldSet = BuildExternalMetadataFieldSet(eclItem);
                if (eclExternalMetadataFieldSet != null)
                {
                    eclStubComponent.ExtensionData["ECL-ExternalMetadata"] = eclExternalMetadataFieldSet;
                }
            }
        }
 public static string GetComponentLinkedValue(this IFieldSet fields, string schemaFieldName, bool isLinkedFieldMetadata,
                                              string componentFieldName)
 {
     if (fields.ContainsKey(schemaFieldName))
     {
         if (fields[schemaFieldName].LinkedComponentValues.Count > 0)
         {
             var linkedComponent = fields[schemaFieldName].LinkedComponentValues[0];
             if (isLinkedFieldMetadata)
             {
                 if (linkedComponent.MetadataFields.ContainsKey(componentFieldName))
                 {
                     return(linkedComponent.MetadataFields.GetValue(componentFieldName));
                 }
             }
             else
             {
                 if (linkedComponent.Fields.ContainsKey(componentFieldName))
                 {
                     return(linkedComponent.Fields.GetValue(componentFieldName));
                 }
             }
         }
     }
     return(string.Empty);
 }
示例#3
0
        protected static void AssertScalarField(IFieldSet fieldSet, int fieldIndex, FastType type, String name, Operator op)
        {
            var field = (Scalar)fieldSet.GetField(fieldIndex);

            AssertScalarField(field, type, name);
            Assert.AreEqual(op, field.Operator);
        }
        private IFieldSet BuildExternalMetadataFieldSet(IContentLibraryItem eclItem)
        {
            string externalMetadataXml = eclItem.MetadataXml;

            if (string.IsNullOrEmpty(externalMetadataXml))
            {
                // No external metadata available; nothing to do.
                return(null);
            }

            ISchemaDefinition externalMetadataSchema = eclItem.MetadataXmlSchema;

            if (externalMetadataSchema == null)
            {
                _log.Warning(string.Format("ECL Item '{0}' has external metadata, but no schema defining it.", eclItem.Id));
                return(null);
            }

            try
            {
                XmlDocument externalMetadataDoc = new XmlDocument();
                externalMetadataDoc.LoadXml(externalMetadataXml);
                IFieldSet result = CreateExternalMetadataFieldSet(externalMetadataSchema.Fields, externalMetadataDoc.DocumentElement);

                _log.Debug(string.Format("ECL Item '{0}' has external metadata: {1}", eclItem.Id, string.Join(", ", result.Keys)));
                return(result);
            }
            catch (Exception ex)
            {
                _log.Error("An error occurred while parsing the external metadata for ECL Item " + eclItem.Id);
                _log.Error(ex.Message);
                return(null);
            }
        }
        protected void AssertEqualFieldSets(IFieldSet expected, IFieldSet actual)
        {
            Assert.IsTrue(actual.Keys.SequenceEqual(expected.Keys), "FieldSets have different Keys.");

            foreach (IField field in expected.Values)
            {
                IField deserializedField = actual[field.Name];
                Assert.AreEqual(field.FieldType, deserializedField.FieldType, "FieldType");
                switch (field.FieldType)
                {
                case FieldType.Number:
                    Assert.IsNotNull(deserializedField.NumericValues, "NumericValues");
                    Assert.IsTrue(deserializedField.NumericValues.SequenceEqual(field.NumericValues), "NumericValues");
                    break;

                case FieldType.Date:
                    Assert.IsNotNull(deserializedField.DateTimeValues, "DateTimeValues");
                    Assert.IsTrue(deserializedField.DateTimeValues.SequenceEqual(field.DateTimeValues), "DateTimeValues");
                    break;

                case FieldType.Embedded:
                    Assert.IsNotNull(deserializedField.EmbeddedValues, "EmbeddedValues");
                    Assert.AreEqual(deserializedField.EmbeddedValues.Count, field.EmbeddedValues.Count, "#EmbeddedValues");
                    break;

                default:
                    Assert.IsNotNull(deserializedField.Values, "Values");
                    Assert.IsTrue(deserializedField.Values.SequenceEqual(field.Values), "Values");
                    break;
                }
            }
        }
 private string FindInHierarchy(IFieldSet fields, string name)
 {
     return(fields
            .Generate(fs => fs.Field("Link", fld => fld.EmbeddedValues.FirstOrDefault()))
            .Select(fld => fld.Field(name))
            .LastOrDefault(s => !string.IsNullOrEmpty(s)));
 }
示例#7
0
 public Paragraph Create(IFieldSet fs)
 {
     return(new Paragraph
     {
         BodyText = fs.Field("BodyText", fld => richTextHelper.ResolveRichText(fld.Value)) ?? string.Empty,
         SubTitle = fs.Field("SubTitle"),
     });
 }
示例#8
0
 public static string Image(this IFieldSet fields, string name = "Image")
 {
     return(fields.Field(name,
                         fld => fld.LinkedComponentValues
                         .Select(c => c.Multimedia.Url)
                         .FirstOrDefault()
                         ));
 }
 public Paragraph Create(IFieldSet fs)
 {
     return new Paragraph
     {
         BodyText = fs.Field("BodyText", fld => richTextHelper.ResolveRichText(fld.Value)) ?? string.Empty,
         SubTitle = fs.Field("SubTitle"),
     };
 }
示例#10
0
        public static void Update <TTable>(this IFieldSet me, DataConnection conn)
            where TTable : class
        {
            var tableType     = typeof(TTable);
            var parameterExpr = Expression.Parameter(tableType);

            Expression predicate = null;
            var        setters   = new List <Setter>();

            foreach (var property in me.GetType().GetProperties())
            {
                if (property.CustomAttributes.Any(x => x.AttributeType == typeof(NotMappedAttribute)))
                {
                    continue;
                }

                var propertyExpr  = Expression.Property(parameterExpr, property.Name);
                var propertyValue = property.GetValue(me);

                if (propertyValue is Field field)
                {
                    setters.Add(new Setter(field, Expression.Lambda(propertyExpr, parameterExpr)));
                }
                else
                {
                    var keyExpr = Expression.Equal(propertyExpr, Expression.Constant(propertyValue));

                    predicate = predicate == null ? keyExpr : Expression.And(predicate, keyExpr);
                }
            }

            var queryable = conn.GetTable <TTable>().Where(Expression.Lambda <Func <TTable, bool> >(predicate, parameterExpr));


            IUpdatable <TTable> updatable = null;

            foreach (var setter in setters)
            {
                if (updatable == null)
                {
                    updatable = SetMethods["IQueryable`1"]
                                .MakeGenericMethod(tableType, setter.Field.GetValueType())
                                .Invoke(
                        null,
                        new[] { queryable, setter.Lambda, setter.Field.GetValue() }) as IUpdatable <TTable>;
                }
                else
                {
                    updatable = SetMethods["IUpdatable`1"]
                                .MakeGenericMethod(tableType, setter.Field.GetValueType())
                                .Invoke(
                        null,
                        new[] { updatable, setter.Lambda, setter.Field.GetValue() }) as IUpdatable <TTable>;
                }
            }

            updatable.Update();
        }
 public override IEnumerable<string> GetMultiValue(IFieldSet fields)
 {
     var result = new List<MvcHtmlString>();
     if (fields.ContainsKey(SchemaFieldName))
     {
         result.AddRange(fields[SchemaFieldName].Values.Select(item => item.ResolveRichText()));
     }
     return result.Select(x=>x.ToString());
 }
 public override object GetValue(IFieldSet fields, IPage page = null)
 {
     var linkedKeyword = fields.GetLinkedKeyword(SchemaFieldName);
     if (linkedKeyword != null)
     {
         return KeywordViewModelBuilder.Build(linkedKeyword, TargetType);
     }
     return null;
 }
 public override IEnumerable<DateTime> GetMultiValue(IFieldSet source, IPage page = null)
 {
     var linkedComponent = source.GetLinkedComponent(SchemaFieldName);
     if (linkedComponent != null && linkedComponent.Fields.ContainsKey(ComponentFieldName))
     {
         return linkedComponent.Fields[ComponentFieldName].DateTimeValues;
     }
     return new List<DateTime>();
 }
 public override object GetValue(IFieldSet fields, IPage page = null)
 {
     var linkedComponent = fields.GetLinkedComponent(SchemaFieldName);
     if (linkedComponent != null)
     {
         return ComponentViewModelBuilder.Build(linkedComponent, TargetType, page);
     }
     return null;
 }
 public override object GetValue(IFieldSet fields, IPage page = null)
 {
     var embeddedFieldSet = fields.GetEmbeddedFieldSet(SchemaFieldName);
     if (embeddedFieldSet != null)
     {
         return ComponentViewModelBuilder.Build(embeddedFieldSet, TargetType, page);
     }
     return null;
 }
 public override DateTime GetValue(IFieldSet fields, IPage page = null)
 {
     var linkedComponent = fields.GetLinkedComponent(SchemaFieldName);
     if (linkedComponent != null && linkedComponent.Fields.ContainsKey(ComponentFieldName))
     {
         return linkedComponent.Fields[ComponentFieldName].DateTimeValues[0];
     }
     return DateTime.MinValue;
 }
 public override object GetValue(IFieldSet fields, IPage page = null)
 {
     var linkedComponent = fields.GetLinkedComponent(SchemaFieldName);
     if (linkedComponent != null)
     {
         return linkedComponent;
     }
     return null;
 }
 public override string GetValue(IFieldSet fields, IPage page = null)
 {
     var linkedComponent = fields.GetLinkedComponent(SchemaFieldName);
     if(linkedComponent != null)
     {
         return linkedComponent.Fields.GetValue(ComponentFieldName).RemoveNamespacesAndWrapInParagraph().ResolveRichText(page).ToString();
     }
     return string.Empty;
 }
示例#19
0
        public override IEnumerable <object> GetMultiValue(IFieldSet fields, IPage page = null)
        {
            var linkedComponents = fields.GetLinkedComponentMultiValue(SchemaFieldName);

            if (linkedComponents != null)
            {
                return(linkedComponents);
            }
            return(null);
        }
示例#20
0
        public override DateTime GetValue(IFieldSet fields, IPage page = null)
        {
            var linkedComponent = fields.GetLinkedComponent(SchemaFieldName);

            if (linkedComponent != null && linkedComponent.Fields.ContainsKey(ComponentFieldName))
            {
                return(linkedComponent.Fields[ComponentFieldName].DateTimeValues[0]);
            }
            return(DateTime.MinValue);
        }
示例#21
0
        public override IEnumerable <DateTime> GetMultiValue(IFieldSet source, IPage page = null)
        {
            var linkedComponent = source.GetLinkedComponent(SchemaFieldName);

            if (linkedComponent != null && linkedComponent.Fields.ContainsKey(ComponentFieldName))
            {
                return(linkedComponent.Fields[ComponentFieldName].DateTimeValues);
            }
            return(new List <DateTime>());
        }
示例#22
0
        public Person MapFieldSet(IFieldSet fieldSet)
        {
            Person result = new Person()
            {
                Name      = fieldSet.ReadRawString(0),
                Firstname = fieldSet.ReadRawString(1),
            };

            return(result);
        }
 public override string GetValue(IFieldSet fields)
 {
     var result = new StringBuilder();
     if (fields.ContainsKey(SchemaFieldName))
     {
         string value = fields[SchemaFieldName].Value;
         result.Append(value.ResolveRichText());
     }
     return result.ToString();
 }
        public static string GetValue(this IFieldSet fields, string schemaFieldName)
        {
            var result = new StringBuilder();

            if (fields.ContainsKey(schemaFieldName))
            {
                result.Append(fields[schemaFieldName].Value);
            }
            return(result.ToString());
        }
        public override object GetValue(IFieldSet fields, IPage page = null)
        {
            var linkedComponent = fields.GetLinkedComponent(SchemaFieldName);

            if (linkedComponent != null)
            {
                return(ComponentViewModelBuilder.Build(linkedComponent, TargetType, page));
            }
            return(null);
        }
        public override object GetValue(IFieldSet fields, IPage page = null)
        {
            var linkedKeyword = fields.GetLinkedKeyword(SchemaFieldName);

            if (linkedKeyword != null)
            {
                return(KeywordViewModelBuilder.Build(linkedKeyword, TargetType));
            }
            return(null);
        }
示例#27
0
        public override object GetValue(IFieldSet fields, IPage page = null)
        {
            var linkedComponent = fields.GetLinkedComponent(SchemaFieldName);

            if (linkedComponent != null)
            {
                return(linkedComponent);
            }
            return(null);
        }
示例#28
0
        protected static void AssertScalarField(IFieldSet fieldSet, int fieldIndex, FastType type, String name,
                                                OperatorCodec operatorCodec,
                                                ScalarValue defaultValue)
        {
            var field = (Scalar)fieldSet.GetField(fieldIndex);

            AssertScalarField(field, type, name);
            Assert.AreEqual(operatorCodec, field.OperatorCodec);
            Assert.AreEqual(defaultValue, field.DefaultValue);
        }
        public static IEnumerable <string> GetMultiValue(this IFieldSet fields, string schemaFieldName)
        {
            var result = new List <string>();

            if (fields.ContainsKey(schemaFieldName))
            {
                return(fields[schemaFieldName].Values);
            }
            return(result);
        }
示例#30
0
        public override IEnumerable <string> GetMultiValue(IFieldSet fields, IPage page = null)
        {
            var result = new List <MvcHtmlString>();

            if (fields.ContainsKey(SchemaFieldName))
            {
                result.AddRange(fields[SchemaFieldName].Values.Select(item => item.ResolveRichText(page)));
            }
            return(result.Select(x => x.ToString()));
        }
示例#31
0
        public override object GetValue(IFieldSet fields, IPage page = null)
        {
            var embeddedFieldSet = fields.GetEmbeddedFieldSet(SchemaFieldName);

            if (embeddedFieldSet != null)
            {
                return(ComponentViewModelBuilder.Build(embeddedFieldSet, TargetType, page));
            }
            return(null);
        }
        public override IEnumerable<object> GetMultiValue(IFieldSet fields, IPage page = null)
        {
            var linkedComponents = fields.GetLinkedComponentMultiValue(SchemaFieldName);

            if (linkedComponents != null)
            {
                return linkedComponents;
            }
            return null;
        }
        public override string GetValue(IFieldSet fields, IPage page = null)
        {
            var linkedComponent = fields.GetLinkedComponent(SchemaFieldName);

            if (linkedComponent != null)
            {
                return(linkedComponent.Fields.GetValue(ComponentFieldName).RemoveNamespacesAndWrapInParagraph().ResolveRichText(page).ToString());
            }
            return(string.Empty);
        }
 public static string GetKeywordUriValue(this IFieldSet fields, string schemaFieldName)
 {
     if (fields.ContainsKey(schemaFieldName))
     {
         if (fields[schemaFieldName].Keywords.Count > 0)
         {
             return(fields[schemaFieldName].Keywords[0].Id);
         }
     }
     return(null);
 }
 public static IComponent GetLinkedComponent(this IFieldSet fields, string schemaFieldName)
 {
     if (fields.ContainsKey(schemaFieldName))
     {
         if (fields[schemaFieldName].LinkedComponentValues.Count > 0)
         {
             return(fields[schemaFieldName].LinkedComponentValues[0]);
         }
     }
     return(null);
 }
示例#36
0
 private HtmlString XpmMarkupFor(IFieldSet fields, IModelProperty fieldProp, int index)
 {
     try
     {
         return(new HtmlString(GenerateSiteEditTag(GetField(fields, fieldProp), index)));
     }
     catch (NullReferenceException)
     {
         return(null);
     }
 }
示例#37
0
        private IField GetField(IFieldSet fields, IModelProperty fieldProp)
        {
            IField result = null;

            if (fieldProp.PropertyAttribute is IFieldAttribute)
            {
                var fieldName = ((IFieldAttribute)fieldProp.PropertyAttribute).FieldName;
                result = fields.ContainsKey(fieldName) ? fields[fieldName] : null;
            }
            return(result);
        }
 public static IEnumerable <IComponent> GetLinkedComponentMultiValue(this IFieldSet fields, string schemaFieldName)
 {
     if (fields.ContainsKey(schemaFieldName))
     {
         if (fields[schemaFieldName].LinkedComponentValues.Count > 0)
         {
             return(fields[schemaFieldName].LinkedComponentValues);
         }
     }
     return(new List <IComponent>());
 }
示例#39
0
        private static bool TryResolveMultiValueViewModelProperty <T>(IFieldSet source, ITridionViewModelPropertyAttribute attribute, out IEnumerable <T> values, IPage page = null)
        {
            values = null;
            var objAttribute = attribute as ITridionViewModelPropertyAttribute <T>;

            if (objAttribute != null)
            {
                values = objAttribute.GetMultiValue(source, page);
            }
            return(objAttribute != null);
        }
示例#40
0
        private static bool TryResolveViewModelProperty <T>(IFieldSet source, ITridionViewModelPropertyAttribute attribute, out T value, IPage page = null)
        {
            value = default(T);
            var objAttribute = attribute as ITridionViewModelPropertyAttribute <T>;

            if (objAttribute != null)
            {
                value = objAttribute.GetValue(source, page);
            }
            return(objAttribute != null);
        }
示例#41
0
        public Person MapFieldSet(IFieldSet fieldSet)
        {
            Person result = new Person()
            {
                Name      = fieldSet.ReadRawString(0),
                Firstname = fieldSet.ReadRawString(1),
                Birth     = DateTime.ParseExact(fieldSet.ReadString(2), "yyyyMMdd", CultureInfo.CurrentCulture)
            };

            return(result);
        }
        public override IEnumerable<string> GetMultiValue(IFieldSet source, IPage page = null)
        {
            var internalLinks = source.GetLinkedComponentMultiValue(SchemaFieldName);

            if (internalLinks.Any())
            {
                var linkProvider = DependencyResolver.Current.GetService<ILinkProvider>();
                return internalLinks.Select(internalLink => page != null ? linkProvider.ResolveLink(page.Id, internalLink.Id, "") : linkProvider.ResolveLink(internalLink.Id));
            }

            return source.GetMultiValue(SchemaFieldName);
        }
 public override IEnumerable<string> GetMultiValue(IFieldSet fields, IPage page = null)
 {
     var result = new List<string>();
     if (fields.ContainsKey(SchemaFieldName))
     {
         foreach(var linkedComponent in fields[SchemaFieldName].LinkedComponentValues)
         {
             string value = linkedComponent.Fields.GetValue(ComponentFieldName);
             result.Add(value.RemoveNamespacesAndWrapInParagraph().ResolveRichText(page).ToString());
         }
     }
     return result;
 }
 public override string GetValue(IFieldSet fields, IPage page = null)
 {
     var stringBuilder = new StringBuilder();
     if (fields.ContainsKey(SchemaFieldName))
     {
         if (fields[SchemaFieldName].LinkedComponentValues.Count > 0)
         {
             var linkedComponent = fields[SchemaFieldName].LinkedComponentValues[0];
             stringBuilder.Append(linkedComponent.Multimedia.Url);
         }
     }
     return stringBuilder.ToString();
 }
 public override string GetValue(IFieldSet fields, IPage page = null)
 {
     if (fields.ContainsKey(SchemaFieldName))
     {
         if (fields[SchemaFieldName].LinkedComponentValues.Count > 0)
         {
             var linkedComponent = fields[SchemaFieldName].LinkedComponentValues[0];
             if(linkedComponent.Fields.ContainsKey(ComponentFieldName))
             {
                 return linkedComponent.Fields[ComponentFieldName].LinkedComponentValues[0].Multimedia.Url;
             }
         }
     }
     return string.Empty;
 }
 public override IEnumerable<string> GetMultiValue(IFieldSet fields, IPage page = null)
 {
     List<string> values = new List<string>();
     if(fields.ContainsKey(SchemaFieldName))
     {
         var linkedComponent = fields[SchemaFieldName].LinkedComponentValues[0];
         
         if (linkedComponent.Fields.ContainsKey(ComponentFieldName))
         {
             return linkedComponent.Fields[ComponentFieldName].LinkedComponentValues.Select(x=>x.Multimedia.Url);
         }
         
     }
     return values;
 }
        protected static void AssertComposedScalarField(IFieldSet fieldSet, int fieldIndex, FastType type, String name,
                                                        Operator exponentOp,
                                                        ScalarValue exponentValue, Operator mantissaOp,
                                                        ScalarValue mantissaValue)
        {
            var field = (ComposedScalar) fieldSet.GetField(fieldIndex);
            Assert.AreEqual(type, field.FastType);
            Assert.AreEqual(name, field.Name);

            Scalar[] fields = field.Fields;
            Assert.AreEqual(exponentOp, fields[0].Operator);
            Assert.AreEqual(exponentValue, fields[0].DefaultValue);

            Assert.AreEqual(mantissaOp, fields[1].Operator);
            Assert.AreEqual(mantissaValue, fields[1].DefaultValue);
        }
        public override string GetValue(IFieldSet fields, IPage page = null)
        {
            var internalLink = fields.GetLinkedComponent(SchemaFieldName);
            
            string link = string.Empty;
            if(internalLink != null)
            {
                var linkProvider = DependencyResolver.Current.GetService<ILinkProvider>();

                if (linkProvider != null) link = page != null ? linkProvider.ResolveLink(page.Id, internalLink.Id, "") : linkProvider.ResolveLink(internalLink.Id);
            }
            else
            {
                //External Link
                return fields.GetValue(SchemaFieldName);
            }

            return link;
        }
 public override IEnumerable<string> GetMultiValue(IFieldSet source, IPage page = null)
 {
     var values = new List<string>();
     if(source.ContainsKey(SchemaFieldName))
     {
         foreach(var linkedComponent in source[SchemaFieldName].LinkedComponentValues)
         {
             values.Add(linkedComponent.Multimedia.Url);
         }
     }
     else if(SchemaFieldName == "" && source.Count > 0)
     {
         foreach (var linkedComponent in source.First().Value.LinkedComponentValues)
         {
             values.Add(linkedComponent.Multimedia.Url);
         }
     }
     return values;
 }
 public override double GetValue(IFieldSet fields, IPage page = null)
 {
     return fields.GetNumberValue(SchemaFieldName);
 }
 public override IEnumerable<string> GetMultiValue(IFieldSet fields)
 {
     return fields.GetComponentLinkedMultiValue(SchemaFieldName, IsLinkedFieldMetadata, ComponentFieldName);
 }
 public override double GetValue(IFieldSet fields, IPage page = null)
 {
     return fields.GetComponentLinkedNumberValue(SchemaFieldName, IsLinkedFieldMetadata, ComponentFieldName);
 }
 public override IEnumerable<double> GetMultiValue(IFieldSet source, IPage page = null)
 {
     return source.GetComponentLinkedNumberMultiValue(SchemaFieldName, IsLinkedFieldMetadata, ComponentFieldName);
 }
 public override IEnumerable<string> GetMultiValue(IFieldSet fields, IPage page = null)
 {
     return fields.GetMultiValue(SchemaFieldName);
 }
 public override string GetValue(IFieldSet fields, IPage page = null)
 {
     return fields.GetValue(SchemaFieldName);
 }
 public override string GetValue(IFieldSet fields)
 {
     return fields.GetKeywordUriValue(SchemaFieldName);
 }
 public override IEnumerable<bool> GetMultiValue(IFieldSet source, IPage page = null)
 {
     var values = source.GetComponentLinkedMultiValue(SchemaFieldName, IsLinkedFieldMetadata, ComponentFieldName);
     return values.Select(ParseString).ToList();
 }
 public override IEnumerable<string> GetMultiValue(IFieldSet fields)
 {
     return fields.GetKeywordUriMultiValue(SchemaFieldName);
 }
 public override string GetValue(IFieldSet fields)
 {
     return fields.GetComponentLinkedValue(SchemaFieldName, IsLinkedFieldMetadata, ComponentFieldName);
 }
        public override IEnumerable<object> GetMultiValue(IFieldSet fields, IPage page = null)
        {
            var embeddedFieldSets = fields.GetEmbeddedFieldSetMultiValue(SchemaFieldName);

            return embeddedFieldSets.Select(fieldSet => ComponentViewModelBuilder.Build(fieldSet, TargetType, page));
        }