Esempio n. 1
0
        public MetaCompilerAnnotations Add(MetaCompilerAnnotation annotation)
        {
            List <MetaCompilerAnnotation> newAnnotations = new List <Meta.MetaCompilerAnnotation>(this.Annotations);

            newAnnotations.Add(annotation);
            return(new MetaCompilerAnnotations(newAnnotations));
        }
Esempio n. 2
0
        public IReadOnlyList <string> GetPropertyValues(string name, string property)
        {
            MetaCompilerAnnotation annot = this.Annotations.FirstOrDefault(a => a.Name == name);

            if (annot == null)
            {
                return(null);
            }
            return(annot.Properties.First(p => p.Name == property)?.Values);
        }
Esempio n. 3
0
        public bool HasProperty(string name, string property)
        {
            MetaCompilerAnnotation annot = this.Annotations.FirstOrDefault(a => a.Name == name);

            if (annot == null)
            {
                return(false);
            }
            return(annot.Properties.Any(p => p.Name == property));
        }