src/Misc/EFTools/EntityDesign/VisualStudio/Package/ConnectionManager.cs
// <summary>
//     Takes our Xml .config file and destructively updates our local hash.
// </summary>
// <param name="project">DTE Project that owns App.Config we want to look at.</param>
Takes our Xml .config file and destructively updates our local hash.
Takes our Xml . config file and destructively updates our local hash .
internal void ExtractConnStringsIntoHash(Project project, bool createConfig)
        {
            if (VsUtils.IsMiscellaneousProject(project))
            {
                return;
            }
            var configFileUtils = new ConfigFileUtils(project, PackageManager.Package);
            if (createConfig)
            {
                configFileUtils.GetOrCreateConfigFile();
            }
            var configXmlDoc = configFileUtils.LoadConfig();
            if (configXmlDoc != null)
            {
                var xmlNodeList = configXmlDoc.SelectNodes(XpathConnectionStringsAddEntity);
                var stringHash = new Dictionary<string, ConnectionString>();
                foreach (XmlNode node in xmlNodeList)
                {
                    var connStringObj = new ConnectionString(node.Attributes.GetNamedItem(XmlAttrNameConnectionString).Value);
                    stringHash.Add(node.Attributes.GetNamedItem(XmlAttrNameName).Value, connStringObj);
                }
                ConnStringsByProjectHash[project] = stringHash;
            }
        }
internal void ExtractConnStringsIntoHash ( Project project , bool createConfig ) { if ( VsUtils . IsMiscellaneousProject ( project ) ) { return ; } var configFileUtils = new ConfigFileUtils ( project , PackageManager . Package ) ; if ( createConfig ) { configFileUtils . GetOrCreateConfigFile ( ) ; } var configXmlDoc = configFileUtils . LoadConfig ( ) ; if ( configXmlDoc != null ) { var xmlNodeList = configXmlDoc . SelectNodes ( XpathConnectionStringsAddEntity ) ; var stringHash = new Dictionary < string , ConnectionString > ( ) ; foreach ( XmlNode node in xmlNodeList ) { var connStringObj = new ConnectionString ( node . Attributes . GetNamedItem ( XmlAttrNameConnectionString ) . Value ) ; stringHash . Add ( node . Attributes . GetNamedItem ( XmlAttrNameName ) . Value , connStringObj ) ; } ConnStringsByProjectHash [ project ] = stringHash ; } }
Takes our Xml .config file and destructively updates our local hash.
Takes our Xml . config file and destructively updates our local hash .
// from msdn: UniqueName: This [property] returns a temporary, unique string value that you can use to  // differentiate one project from another.
project
Project
DTE Project that owns App.Config we want to look at.
DTE Project that owns App . Config we want to look at .
createConfig
bool