コード例 #1
0
 public PropTag MapNamedProp(NamedPropData npData, PropType propType)
 {
     NamedPropMapper.Mapping mapping = this.ByNamedProp[npData];
     if (mapping != null)
     {
         return(PropTagHelper.PropTagFromIdAndType(mapping.PropId, propType));
     }
     return(PropTag.Unresolved);
 }
コード例 #2
0
ファイル: PstMailbox.cs プロジェクト: YHZX2013/exchange_diff
 public static NamedPropData[] NpdaFromMoMTNpva(NamedProperty[] momtNpva)
 {
     NamedPropData[] array = new NamedPropData[momtNpva.Length];
     for (int i = 0; i < momtNpva.Length; i++)
     {
         array[i]      = new NamedPropData();
         array[i].Guid = momtNpva[i].Guid;
         if (momtNpva[i].Kind == NamedPropertyKind.Id)
         {
             array[i].Id = (int)momtNpva[i].Id;
         }
         else
         {
             array[i].Name = momtNpva[i].Name;
         }
     }
     return(array);
 }
コード例 #3
0
        NamedPropData[] IMailbox.GetNamesFromIDs(PropTag[] pta)
        {
            MrsTracer.Provider.Function("StorageMailbox.GetNamedFromIDs", new object[0]);
            base.CheckDisposed();
            base.VerifyMailboxConnection(VerifyMailboxConnectionFlags.None);
            new List <NamedProp>(pta.Length);
            List <ushort> list = new List <ushort>(pta.Length);

            foreach (PropTag propTag in pta)
            {
                list.Add((ushort)propTag.Id());
            }
            NamedPropertyDefinition.NamedPropertyKey[] namesFromIds;
            using (base.RHTracker.Start())
            {
                namesFromIds = NamedPropConverter.GetNamesFromIds(this.StoreSession, list);
            }
            NamedPropData[] array = new NamedPropData[namesFromIds.Length];
            for (int j = 0; j < namesFromIds.Length; j++)
            {
                array[j] = new NamedPropData();
                if (namesFromIds[j] is GuidNamePropertyDefinition.GuidNameKey)
                {
                    GuidNamePropertyDefinition.GuidNameKey guidNameKey = (GuidNamePropertyDefinition.GuidNameKey)namesFromIds[j];
                    array[j].Kind = 1;
                    array[j].Guid = guidNameKey.PropertyGuid;
                    array[j].Name = guidNameKey.PropertyName;
                }
                else
                {
                    if (!(namesFromIds[j] is GuidIdPropertyDefinition.GuidIdKey))
                    {
                        throw new CorruptNamedPropDataException((namesFromIds[j] == null) ? "null" : namesFromIds[j].GetType().ToString());
                    }
                    GuidIdPropertyDefinition.GuidIdKey guidIdKey = (GuidIdPropertyDefinition.GuidIdKey)namesFromIds[j];
                    array[j].Kind = 0;
                    array[j].Guid = guidIdKey.PropertyGuid;
                    array[j].Id   = guidIdKey.PropertyId;
                }
            }
            return(array);
        }
コード例 #4
0
 public ContentFilterPropertyDefinition(string propertyName, Type propertyType, object defaultValue, NamedPropData namedPropToSearch, PropType namedPropType, ContentFilterSchema.ContentFilterPropertyDefinition.ConvertToRestrictionDelegate convertToRestriction) : base(propertyName, ExchangeObjectVersion.Exchange2010, propertyType, (defaultValue == null) ? PropertyDefinitionFlags.None : PropertyDefinitionFlags.PersistDefaultValue, defaultValue, PropertyDefinitionConstraint.None, PropertyDefinitionConstraint.None)
 {
     this.propTagToSearch      = PropTag.Null;
     this.namedPropToSearch    = namedPropToSearch;
     this.namedPropType        = namedPropType;
     this.convertToRestriction = convertToRestriction;
 }
コード例 #5
0
 PropTag IFilterBuilderHelper.MapNamedProperty(NamedPropData npd, PropType propType)
 {
     return(this.NamedPropMapper.MapNamedProp(npd, propType));
 }
コード例 #6
0
 public Mapping(int propId, NamedPropData npData)
 {
     this.PropId = propId;
     this.NPData = npData;
 }
コード例 #7
0
 public InboxNamedPropFolderMapping(WellKnownFolderType wkft, NamedPropData namedPropData) : base(wkft, PropTag.Null)
 {
     this.NamedPropData = namedPropData;
 }