private static void UpdateFileReference(BaseReference f, string targetFrameworkVersion) { if (String.IsNullOrEmpty(f.ResolvedPath)) { throw new FileNotFoundException(null, f.SourcePath); } string hash; long size; if (string.IsNullOrEmpty(targetFrameworkVersion)) { Util.GetFileInfo(f.ResolvedPath, out hash, out size); } else { Util.GetFileInfo(f.ResolvedPath, targetFrameworkVersion, out hash, out size); } f.Hash = hash; f.Size = size; if (String.IsNullOrEmpty(f.TargetPath)) { if (!String.IsNullOrEmpty(f.SourcePath)) { f.TargetPath = BaseReference.GetDefaultTargetPath(f.SourcePath); } else { f.TargetPath = BaseReference.GetDefaultTargetPath(Path.GetFileName(f.ResolvedPath)); } } }
private static void UpdateFileReference(BaseReference f) { string str; long num; if (string.IsNullOrEmpty(f.ResolvedPath)) { throw new FileNotFoundException(null, f.SourcePath); } Util.GetFileInfo(f.ResolvedPath, out str, out num); f.Hash = str; f.Size = num; if (string.IsNullOrEmpty(f.TargetPath)) { if (!string.IsNullOrEmpty(f.SourcePath)) { f.TargetPath = BaseReference.GetDefaultTargetPath(f.SourcePath); } else { f.TargetPath = BaseReference.GetDefaultTargetPath(Path.GetFileName(f.ResolvedPath)); } } }