示例#1
0
 public void PerformRWOperations()
 {
     if (employee.Role.ToUpper() == "CEO" || employee.Role.ToUpper() == "MANAGER")
     {
         folder = new SharedFolder();
         Console.WriteLine("Shared Folder Proxy makes call to the RealFolder 'PerformRWOperations method'");
         folder.PerformRWOperations();
     }
     else
     {
         Console.WriteLine("Shared Folder proxy says 'You don't have permission to access this folder'");
     }
 }
示例#2
0
 public void PerformRWOperations()
 {
     if (_person.Role == role.CEO || _person.Role == role.MANAGER)
     {
         folder = new SharedFolder();
         folder.PerformRWOperations();
     }
     else
     {
         Console.WriteLine
             ("You don't have permission to access this folder");
     }
 }