public MetaCompilerAnnotations Add(MetaCompilerAnnotation annotation) { List <MetaCompilerAnnotation> newAnnotations = new List <Meta.MetaCompilerAnnotation>(this.Annotations); newAnnotations.Add(annotation); return(new MetaCompilerAnnotations(newAnnotations)); }
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); }
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)); }