示例#1
0
        public void SetProperty(NumericalPropertyTag propertyTag, PropertyValue propertyValue)
        {
            var resolvedTag = propertyNameToIdMap.Resolve(propertyTag);

            if (resolvedTag.HasNoValue)
            {
                return;
            }

            objectTracker.SetProperty(objectPath, resolvedTag.Value, propertyValue);
        }
示例#2
0
文件: Folder.cs 项目: phx255/PST
        public Folder NewFolder(string displayName)
        {
            var childFolderNodePath = objectPath.Add(nodeIdAllocator.Allocate(Constants.NID_TYPE_NORMAL_FOLDER));

            objectTracker.TrackObject(
                childFolderNodePath,
                ObjectTypes.Folder,
                ObjectStates.New);

            objectTracker.SetProperty(
                childFolderNodePath,
                MAPIProperties.PidTagDisplayName,
                new PropertyValue(stringEncoder.Encode(displayName)));

            objectTracker.SetProperty(
                childFolderNodePath,
                MAPIProperties.PidTagContentCount,
                new PropertyValue(BinaryData.OfValue(0)));

            objectTracker.SetProperty(
                childFolderNodePath,
                MAPIProperties.PidTagContentUnreadCount,
                new PropertyValue(BinaryData.OfValue(0)));

            objectTracker.SetProperty(
                childFolderNodePath,
                MAPIProperties.PidTagSubfolders,
                new PropertyValue(BinaryData.OfValue(false)));

            return
                (new Folder(
                     childFolderNodePath,
                     objectTracker,
                     recipientTracker,
                     stringEncoder,
                     propertyNameToIdMap,
                     propertyContextBasedPropertyReader,
                     nodeEntryFinder,
                     rowIndexReader,
                     tableContextBasedPropertyReader,
                     nodeIdAllocator));
        }