FiftyOne.Foundation.Mobile.Detection.WebProvider.CreateNewTemporaryFile C# (CSharp) Метод

CreateNewTemporaryFile() приватный статический Метод

Create a new temporary file for use the stream factory.
private static CreateNewTemporaryFile ( FileInfo masterFile ) : FileInfo
masterFile System.IO.FileInfo Name of the master file to use as the source
Результат System.IO.FileInfo
        private static FileInfo CreateNewTemporaryFile(FileInfo masterFile)
        {
            var temporaryFile = new FileInfo(GetTempFileName());

            // Copy the file to enable other processes to update it.
            try
            {
                File.Copy(masterFile.FullName, temporaryFile.FullName);
                EventLog.Info("Created temp data file - \"{0}\"", temporaryFile.FullName);
            }
            catch (IOException ex)
            {
                throw new MobileException(String.Format(
                    "Could not create temporary file. Check worker process has " +
                    "write permissions to '{0}'. For medium trust environments " +
                    "ensure data file is located in App_Data.",
                    temporaryFile.FullName), ex);
            }
            return temporaryFile;
        }