Esempio n. 1
0
        static Interceptor()
        {
            var workingDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            Directory.SetCurrentDirectory(workingDirectory);
            string configPath = Path.Combine(workingDirectory, Constants.RuntimeConfigFile);

            Configuration = TSVDRuntimeConfiguration.Parse(configPath);
        }
Esempio n. 2
0
        /// <summary>
        /// Read thread safety specification files.
        /// </summary>
        /// <param name="threadSafetySpecificationFiles">Thread safety specification files.</param>
        /// <returns>Thread safety groups.</returns>
        public static List <ThreadSafetyGroup> ReadThreadSafetyGroups(List <string> threadSafetySpecificationFiles)
        {
            List <ThreadSafetyGroup> threadSafetyGroups = new List <ThreadSafetyGroup>();

            foreach (string filePath in threadSafetySpecificationFiles)
            {
                string exePath  = Assembly.GetExecutingAssembly().Location;
                string fullPath = Path.Combine(Path.GetDirectoryName(exePath), filePath);
                TSVDRuntimeConfiguration threadSafetySpecification = TSVDRuntimeConfiguration.Parse(fullPath);
                threadSafetyGroups.AddRange(threadSafetySpecification.ThreadSafetyGroups);
            }

            return(threadSafetyGroups);
        }