src/Misc/EFTools/EntityDesignModel/Entity/AnnotatableElement.cs
/// <summary>
///     this will always return the preceding sibling that appears before the first sibling with a different namespace.
/// </summary>
/// <param name="parent"></param>
/// <returns></returns>
this will always return the preceding sibling that appears before the first sibling with a different namespace.
this will always return the preceding sibling that appears before the first sibling with a different namespace .
private static XElement GetLastSiblingOfMyNamespace(EFElement parent)
        {
            string expectedNamespace;
            if (ModelHelper.GetBaseModelRoot(parent).IsCSDL)
            {
                expectedNamespace = SchemaManager.GetCSDLNamespaceName(parent.Artifact.SchemaVersion);
            }
            else
            {
                expectedNamespace = SchemaManager.GetSSDLNamespaceName(parent.Artifact.SchemaVersion);
            }
            var c = parent.XContainer;
            XElement predecesor = null;
            foreach (var e in c.Elements())
            {
                if (e.Name.NamespaceName.Equals(expectedNamespace, StringComparison.OrdinalIgnoreCase))
                {
                    predecesor = e;
                }
                else
                {
                    break;
                }
            }
            return predecesor;
        }
private static XElement GetLastSiblingOfMyNamespace ( EFElement parent ) { string expectedNamespace ; if ( ModelHelper . GetBaseModelRoot ( parent ) . IsCSDL ) { expectedNamespace = SchemaManager . GetCSDLNamespaceName ( parent . Artifact . SchemaVersion ) ; } else { expectedNamespace = SchemaManager . GetSSDLNamespaceName ( parent . Artifact . SchemaVersion ) ; } var c = parent . XContainer ; XElement predecesor = null ; foreach ( var e in c . Elements ( ) ) { if ( e . Name . NamespaceName . Equals ( expectedNamespace , StringComparison . OrdinalIgnoreCase ) ) { predecesor = e ; } else { break ; } } return predecesor ; }
this will always return the preceding sibling that appears before the first sibling with a different namespace.
this will always return the preceding sibling that appears before the first sibling with a different namespace .
None
parent
EFElement
None