internal Aim3AnnotationInstance(Aim3DocumentInstance aim3Document, string annotationUid)
        {
            Platform.CheckForNullReference(aim3Document, "aim3Document");
            Platform.CheckForEmptyString(annotationUid, "annotationUid");

            AimAnnotation = aim3Document.Annotations.Find(annotation => annotation != null && annotation.UniqueIdentifier == annotationUid);

            if (AimAnnotation == null)
                throw new ArgumentException("AIM3: failed to initialize Annotation Instance from the collection");

            //_parentAimDocument = new WeakReference(aim3Document); // TODO
            _parentAimDocument = aim3Document;
        }
Exemplo n.º 2
0
        internal Aim3AnnotationInstance(Aim3DocumentInstance aim3Document, string annotationUid)
        {
            Platform.CheckForNullReference(aim3Document, "aim3Document");
            Platform.CheckForEmptyString(annotationUid, "annotationUid");

            AimAnnotation = aim3Document.Annotations.Find(annotation => annotation != null && annotation.UniqueIdentifier == annotationUid);

            if (AimAnnotation == null)
            {
                throw new ArgumentException("AIM3: failed to initialize Annotation Instance from the collection");
            }

            //_parentAimDocument = new WeakReference(aim3Document); // TODO
            _parentAimDocument = aim3Document;
        }