Ejemplo n.º 1
0
 internal static void WriteFolderAclTable(CoreFolder coreFolder, byte[] propertyToSet)
 {
     using (FolderPropertyStream folderPropertyStream = (FolderPropertyStream)coreFolder.PropertyBag.OpenPropertyStream(CoreFolderSchema.AclTableAndSecurityDescriptor, PropertyOpenMode.Modify))
     {
         folderPropertyStream.Write(propertyToSet, 0, propertyToSet.Length);
     }
 }
Ejemplo n.º 2
0
 public static FolderSecurity.AclTableAndSecurityDescriptorProperty ReadAclTableAndSecurityDescriptor(ICorePropertyBag propertyBag)
 {
     byte[] buffer;
     using (Stream stream = propertyBag.OpenPropertyStream(CoreFolderSchema.AclTableAndSecurityDescriptor, PropertyOpenMode.ReadOnly))
     {
         FolderPropertyStream stream2 = stream as FolderPropertyStream;
         buffer = Util.StreamHandler.ReadBytesFromStream(stream2);
     }
     return(FolderSecurity.AclTableAndSecurityDescriptorProperty.Parse(buffer));
 }