internal static long GetNextIdentity(XObject element)
        {
            var annotation = element.Annotation<ModelAnnotation>();
            if (annotation == null)
            {
                annotation = new ModelAnnotation();
                element.AddAnnotation(annotation);
            }

            var nextIdentity = annotation.NextIdentity;
            annotation.NextIdentity = ++nextIdentity;

            return nextIdentity;
        }
        internal static long GetNextIdentity(XObject element)
        {
            var annotation = element.Annotation <ModelAnnotation>();

            if (annotation == null)
            {
                annotation = new ModelAnnotation();
                element.AddAnnotation(annotation);
            }

            var nextIdentity = annotation.NextIdentity;

            annotation.NextIdentity = ++nextIdentity;

            return(nextIdentity);
        }