private static void AddReferencedIds(NamedContentData source, IField field, ReferencesExtractor extractor)
        {
            if (source.TryGetValue(field.Name, out var fieldData) && fieldData != null)
            {
                foreach (var partitionValue in fieldData)
                {
                    extractor.SetValue(partitionValue.Value);

                    field.Accept(extractor);
                }
            }
        }
        public static HashSet <DomainId> GetReferencedIds(this IField field, IJsonValue?value, int referencesPerField = int.MaxValue)
        {
            var result = new HashSet <DomainId>();

            if (value != null)
            {
                var extractor = new ReferencesExtractor(result, referencesPerField);

                extractor.SetValue(value);

                field.Accept(extractor);
            }

            return(result);
        }
Beispiel #3
0
        public static HashSet <Guid> GetReferencedIds(this IField field, IJsonValue?value)
        {
            var result = new HashSet <Guid>();

            if (value != null)
            {
                var extractor = new ReferencesExtractor(result);

                extractor.SetValue(value);

                field.Accept(extractor);
            }

            return(result);
        }