// Token: 0x0600053F RID: 1343 RVA: 0x00027F10 File Offset: 0x00026110 private void InitializeRetentionProperties() { this.folderExtendedRetentionProperties = new List <PathToExtendedFieldType>(); this.ewsStorePropertyMapping = new Dictionary <PropertyDefinition, PathToExtendedFieldType>(); foreach (KeyValuePair <string, MapiPropertyTypeType> keyValuePair in RemoteArchiveProcessorBase.ExtendedRetentionPropertyTags) { string key = keyValuePair.Key; MapiPropertyTypeType value = keyValuePair.Value; PathToExtendedFieldType pathToExtendedFieldType = new PathToExtendedFieldType(); pathToExtendedFieldType.PropertyType = value; if (key == "-1") { pathToExtendedFieldType.PropertySetId = RemoteArchiveProcessorBase.RetentionTagEntryId.ToString(); pathToExtendedFieldType.PropertyName = "RetentionTagEntryId"; } else { pathToExtendedFieldType.PropertyTag = key; } this.folderExtendedRetentionProperties.Add(pathToExtendedFieldType); FolderHelper.DataColumnIndex dataColumnIndex = RemoteArchiveProcessorBase.RetentionPropertyTagsMapping[key]; PropertyDefinition key2 = FolderHelper.DataColumns[(int)dataColumnIndex]; this.ewsStorePropertyMapping.Add(key2, pathToExtendedFieldType); } }
/// <summary> /// Creates a GuidId extended field uri /// </summary> /// <param name="guid">Guid representing the property set</param> /// <param name="propId">Property id of the named property</param> /// <param name="propType">Property type</param> /// <returns>PathToExtendedFieldType proxy object</returns> /// public static PathToExtendedFieldType BuildGuidId( Guid guid, int propId, MapiPropertyTypeType propType) { PathToExtendedFieldType result = new PathToExtendedFieldType(); result.PropertyId = propId; // Don’t forget to set the specified property to true for optional value // types!! // result.PropertyIdSpecified = true; result.PropertySetId = guid.ToString("D"); result.PropertyType = propType; return result; }
/// <summary> /// Creates a GuidId extended field URI for a distinguished property set id /// </summary> /// <param name="propertySet">DistinguishedPropertySetId</param> /// <param name="propId">dispatch Id</param> /// <param name="propType">Property type</param> /// <returns>PathToExtendedFieldType</returns> /// public static PathToExtendedFieldType BuildGuidId( DistinguishedPropertySetType propertySet, int propId, MapiPropertyTypeType propType) { PathToExtendedFieldType result = new PathToExtendedFieldType(); result.PropertyId = propId; result.PropertyIdSpecified = true; result.DistinguishedPropertySetId = propertySet; result.DistinguishedPropertySetIdSpecified = true; result.PropertyType = propType; return result; }
/// <summary> /// Constructor to use for single valued items only /// </summary> /// <param name="singleValue">Type for single valued items</param> /// public SingleAndArrayPair(MapiPropertyTypeType singleValue) { this.singleValue = singleValue; this.arrayValue = null; }
/// <summary> /// Creates a prop tag extended field uri (proxy) /// </summary> /// <param name="propId">16-bit Id of property tag</param> /// <param name="propType">property type</param> /// <returns>PathToExtendedFieldType proxy object</returns> /// public static PathToExtendedFieldType BuildPropertyTag( ushort propId, MapiPropertyTypeType propType) { PathToExtendedFieldType result = new PathToExtendedFieldType(); result.PropertyTag = string.Format("0x{0:x}", propId); result.PropertyType = propType; return result; }
/// <summary> /// Build a guid/name extended property path with DisinguishedPropertySetId /// </summary> /// <param name="propertySetId">DistinguishedPropertySetId</param> /// <param name="propertyName">Property Name</param> /// <param name="propertyType">Property Type</param> /// <returns>PathToExtendedFieldType</returns> /// public static PathToExtendedFieldType BuildGuidName( DistinguishedPropertySetType propertySetId, string propertyName, MapiPropertyTypeType propertyType) { PathToExtendedFieldType result = new PathToExtendedFieldType(); result.DistinguishedPropertySetId = propertySetId; result.DistinguishedPropertySetIdSpecified = true; result.PropertyName = propertyName; result.PropertyType = propertyType; return result; }
/// <summary> /// Builds a guid/name extended property /// </summary> /// <param name="guid">Property set guid</param> /// <param name="propertyName">Property name</param> /// <param name="propType">Property type</param> /// <returns>Guid/Name extended property</returns> /// public static PathToExtendedFieldType BuildGuidName( Guid guid, string propertyName, MapiPropertyTypeType propType) { PathToExtendedFieldType result = new PathToExtendedFieldType(); result.PropertySetId = guid.ToString("D"); result.PropertyName = propertyName; result.PropertyType = propType; return result; }
// Token: 0x0600059E RID: 1438 RVA: 0x0002B4B0 File Offset: 0x000296B0 public static object ConvertRetentionPropertyFromService(object propertyValue, MapiPropertyTypeType propertyType) { if (propertyValue == null) { return(null); } if (propertyValue is string) { try { if (propertyType == MapiPropertyTypeType.Binary) { return(Convert.FromBase64String((string)propertyValue)); } if (propertyType != MapiPropertyTypeType.Integer) { return(propertyValue); } return(Convert.ToInt32((string)propertyValue)); } catch (FormatException arg) { ElcEwsClientHelper.Tracer.TraceError <FormatException>(0L, "Unable to convert property, exception {0}.", arg); } catch (ArgumentException arg2) { ElcEwsClientHelper.Tracer.TraceError <ArgumentException>(0L, "Unable to convert property, exception {0}.", arg2); } return(propertyValue); } return(propertyValue); }
// Token: 0x0600059D RID: 1437 RVA: 0x0002B484 File Offset: 0x00029684 public static string ConvertRetentionPropertyForService(object propertyValue, MapiPropertyTypeType propertyType) { if (propertyValue == null) { return(null); } if (propertyType == MapiPropertyTypeType.Binary) { return(Convert.ToBase64String((byte[])propertyValue)); } return(Convert.ToString(propertyValue)); }