Ejemplo n.º 1
0
        public static void AddAnnotationReference(SceneElement element, AnnotationSceneNode annotation)
        {
            ExceptionChecks.CheckNullArgument <SceneElement>(element, "element");
            ExceptionChecks.CheckNullArgument <AnnotationSceneNode>(annotation, "annotation");
            string str = annotation.Id;

            if (string.IsNullOrEmpty(str))
            {
                str = AnnotationUtils.SetAnnotationId(annotation);
            }
            IEnumerable <string> referencedAnnotationIds = AnnotationUtils.GetReferencedAnnotationIds(element);

            AnnotationUtils.SetAnnotationReferences(element, EnumerableExtensions.AppendItem <string>(referencedAnnotationIds, str));
        }