示例#1
0
        public static bool AddFile(string password, string filePath, string fileKey)
        {
            var file = new ApprovedFile
            {
                FileName        = Path.GetFileName(filePath),
                DestinationPath = filePath,
                Password        = password
            };

            return(Whitelist.TryAdd(fileKey, file));
        }
示例#2
0
 //Add a file to the white list 
 public static bool AddFile(SecureString password, string filePath, string fileKey)
 {
     //Create a new approved file
     var file = new ApprovedFile
     {
         FileName = Path.GetFileName(filePath),
         DestinationPath = filePath,
         Password = password
     };
     return Whitelist.TryAdd(fileKey, file);
 }