Ejemplo n.º 1
0
        /// <summary>
        ///     Gets the specified temporary file path.
        /// </summary>
        /// <param name="fileName">Name of the file.</param>
        /// <returns>
        ///     temporary file path
        /// </returns>
        public string Get(string fileName)
        {
            var directory = _provider.Get();

            if (directory == null)
            {
                return(fileName);
            }
            return(Path.Combine(directory.FullName, fileName));
        }
Ejemplo n.º 2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="SubDirectoryProvider" /> class.
 /// </summary>
 /// <param name="provider">The provider.</param>
 /// <param name="subDirectory">The sub directory.</param>
 public SubDirectoryProvider(IDirectoryInfoProvider provider, string subDirectory = null) :
     this(provider.Get(), subDirectory)
 {
 }