src/Misc/EFTools/EntityDesign/VisualStudio/EdmUtils.cs
// <summary>
//     Using proposedNamespace as a starting point return a namespace which is not in the
//     set of existing namespaces recorded in the existingNamespaces Dictionary.
// </summary>
Using proposedNamespace as a starting point return a namespace which is not in the
set of existing namespaces recorded in the existingNamespaces Dictionary.
Using proposedNamespace as a starting point return a namespace which is not in the set of existing namespaces recorded in the existingNamespaces Dictionary .
internal static string ConstructUniqueNamespace(string proposedNamespace, HashSet<string> existingNamespaces)
        {
            Debug.Assert(
                !string.IsNullOrWhiteSpace(proposedNamespace),
                "ConstructUniqueNamespace: Proposed Namespace cannot be null or empty string");
            if (existingNamespaces == null)
            {
                return proposedNamespace;
            }
            var uniqueNamespace = proposedNamespace;
            var uniqueInteger = 1;
            var nfi = new NumberFormatInfo();
            nfi.NumberGroupSeparator = string.Empty;
            while (existingNamespaces.Contains(uniqueNamespace))
            {
                uniqueNamespace = proposedNamespace + uniqueInteger.ToString(nfi);
                uniqueInteger++;
            }
            return uniqueNamespace;
        }
internal static string ConstructUniqueNamespace ( string proposedNamespace , HashSet < string > existingNamespaces ) { Debug . Assert ( ! string . IsNullOrWhiteSpace ( proposedNamespace ) , " " ) ; if ( existingNamespaces == null ) { return proposedNamespace ; } var uniqueNamespace = proposedNamespace ; var uniqueInteger = 1 ; var nfi = new NumberFormatInfo ( ) ; nfi . NumberGroupSeparator = string . Empty ; while ( existingNamespaces . Contains ( uniqueNamespace ) ) { uniqueNamespace = proposedNamespace + uniqueInteger . ToString ( nfi ) ; uniqueInteger ++ ; } return uniqueNamespace ; }
Using proposedNamespace as a starting point return a namespace which is not in the
set of existing namespaces recorded in the existingNamespaces Dictionary.
Using proposedNamespace as a starting point return a namespace which is not in the set of existing namespaces recorded in the existingNamespaces Dictionary .
// NumberFormatInfo below required for localization
proposedNamespace
string
existingNamespaces
HashSet<string>