예제 #1
0
        /// <summary>
        /// opening a connection might take a long time
        /// opening a 2.3 MB umlfile with 86 tables requires 87 Seconds on a 2GHz pc with 768MB ram
        ///
        /// therefor the connection opens it only once until either
        /// - the connectionstring changes
        /// - the file modificationdate changes
        /// </summary>
        private static SchemaXsd3bEx getXsd3b(string connectionString)
        {
            return(SchemaXsd3bEx.ReadXsd3b(connectionString, null));

            /* feature not completed yet, disabled
             *  if (connectionString != null)
             *  {
             *      ListDictionary parms = PlugInSupport.GetConnectParameters(connectionString);
             *      String fileName = parms[PlugInSupport.CONNECT_FILENAME].ToString();
             *
             *      if ((lastXsd3b == null)
             || (connectionString.CompareTo(lastConnectString) != 0)
             || (lastModified != System.IO.File.GetLastWriteTime(fileName)))
             ||     {
             ||         string tempDir = Path.Combine(Environment.GetEnvironmentVariable("temp"), "tmpLastLoaded.xsd3b");
             ||
             ||         // hier gehts weiter
             ||
             ||         lastXsd3b = null; // reset if there is a exception in ReadXsd3b
             ||         lastXsd3b = SchemaXsd3bEx.ReadXsd3b(connectionString, null);
             ||         lastModified = System.IO.File.GetLastWriteTime(fileName);
             ||         lastConnectString = connectionString;
             ||     }
             || }
             || return lastXsd3b;
             */
        }