예제 #1
0
        private void DeleteFromBin(Site site, string fileName)
        {
            var binFile   = GetAssemblyBinFilePath(fileName);
            var canDelete = _assemblyReferences.RemoveReference(binFile, GetReferenceName(site));

            if (canDelete && File.Exists(binFile))
            {
                File.Delete(binFile);
            }
        }
예제 #2
0
        internal void RemoveAssemblies(string moduleName)
        {
            var binPath = Settings.BinDirectory;

            foreach (var item in GetAssemblyFiles(moduleName))
            {
                var binFile   = Path.Combine(binPath, Path.GetFileName(item));
                var removable = _assemblyReferences.RemoveReference(binFile, moduleName);
                if (removable)
                {
                    if (File.Exists(binFile))
                    {
                        File.Delete(binFile);
                    }
                }
            }
        }