Ejemplo n.º 1
0
        public Maybe <PropertyId> GetPropertyId(Guid propertySet, int numericalId)
        {
            var entryStream = propertyContextBasedPropertyReader.Read(MapObjectPath.Ids, MAPIProperties.PidTagNameidStreamEntry);

            if (entryStream.HasNoValue)
            {
                return(Maybe <PropertyId> .NoValue());
            }

            var entriesCount = entryStream.Value.Value.Length / 8;

            for (var i = 0; i < entriesCount; i++)
            {
                var entry = NAMEID.OfValue(entryStream.Value.Value.Take(i * 8, 8));

                if (entry.Type == 0)
                {
                    if (entry.PropertyId == numericalId)
                    {
                        return(Maybe <PropertyId> .OfValue(new PropertyId(entry.PropertyIndex + 0x8000)));
                    }
                }
            }

            return(Maybe <PropertyId> .NoValue());
        }
Ejemplo n.º 2
0
 public Maybe <PropertyValue> GetProperty(PropertyTag propertyTag)
 {
     return
         (objectTracker.GetProperty(
              objectPath,
              propertyTag,
              () => propertyContextBasedPropertyReader.Read(GetNodePath(), propertyTag)));
 }