private object GetAnnotationValue(IEdmElement element, string namespaceName, string localName, VersioningDictionary <IEdmElement, object> annotationsDictionary) { object value; IEdmDirectValueAnnotation edmDirectValueAnnotation = EdmDirectValueAnnotationsManager.FindTransientAnnotation(EdmDirectValueAnnotationsManager.GetTransientAnnotations(element, annotationsDictionary), namespaceName, localName); if (edmDirectValueAnnotation == null) { IEnumerable <IEdmDirectValueAnnotation> attachedAnnotations = this.GetAttachedAnnotations(element); if (attachedAnnotations != null) { IEnumerator <IEdmDirectValueAnnotation> enumerator = attachedAnnotations.GetEnumerator(); using (enumerator) { while (enumerator.MoveNext()) { IEdmDirectValueAnnotation current = enumerator.Current; if (!(current.NamespaceUri == namespaceName) || !(current.Name == localName)) { continue; } value = current.Value; return(value); } return(null); } return(value); } return(null); } else { return(edmDirectValueAnnotation.Value); } }
private static bool IsDead(string namespaceName, string localName, object transientAnnotations) { return(EdmDirectValueAnnotationsManager.FindTransientAnnotation(transientAnnotations, namespaceName, localName) != null); }