我应该使用GUID或DefaultExtendedPropertySet.PublicStrings在构造ExtendedPropertyDefinition? [英] Should I use GUID or DefaultExtendedPropertySet.PublicStrings while constructing ExtendedPropertyDefinition?
问题描述
我使用EWS托管API 1.2与Exchange Server 2007的它执行某种邮件同步的开发C#.NET框架4.5的Windows窗体应用程序。
I am developing C# .NET Framework 4.5 Windows Form application using EWS Managed API 1.2 with Exchange Server 2007 which performs some sort of syncing of mails.
现在,我我处理扩展属性,我想清楚一些事情:
Now that I am dealing with Extended Properties, I want to be clear some things:
Q1 什么是目的 DefaultExtendedPropertySet
类? MSDN 说:一>定义默认设置扩展属性。
Q1. What is the purpose of DefaultExtendedPropertySet
class? MSDN says "Defines the default sets of extended properties."
- 是刚组的扩展属性?
- 如果是,为什么在第一个地方有分组?
- 请我们可以获取属于同一组上一个项目所有扩展属性值的EWS API的方法?
Q2。我不能决定我是否应该使用自定义的GUID或 DefaultExtendedPropertySet.PublicStrings
在构造 ExtendedPropertyDefinition
:
Q2. I am unable to decide whether should I use custom GUID or DefaultExtendedPropertySet.PublicStrings
while constructing ExtendedPropertyDefinition
:
var MyXProp = new ExtendedPropertyDefinition(
DefaultExtendedPropertySet.PublicStrings,
"MyXProp", MapiPropertyType.String);
或
Guid MyPropertySetId = new Guid("{C11FF724-AA03-4555-9952-FA248A11C3E}");
var extendedPropertyDefinition = new ExtendedPropertyDefinition(
MyPropertySetId, "MyXProp", MapiPropertyType.String);
- 什么是应该决定上述决定的因素是什么?
- 此外,它使什么区别通过上述两种方法?
- 是
DefaultExtendedPropertySet
是分组的目的。微软预先定义的一些命名空间,鼓励命名属性的逻辑分组,并在此枚举包括他们。 - 分组到位的舒适,也避免不同推出不同属性的名称之间的碰撞供应商。
- 没有没有API来获取属于同一组的所有属性的值。
- Yes,
DefaultExtendedPropertySet
is for grouping purpose. Microsoft pre-defined some namespaces to encourage logical grouping of named properties and included them in this enumeration. - Grouping is in place for convinience and also to avoid collisions between names of different properties introduced by different vendors.
- No there is no API to fetch values of all properties belonging to same group.
- GUID创建这样在两个级别提供分离的新组,在集团层面和名称的水平,但是,
DefaultExtendedPropertySet.PublicStrings
与非通用名称也足够了。关键是要避免与其他一些供应商创建的命名属性的冲突。PublicStrings
也可以提供更好的可发现性如果应用程序与其他应用程序集成(GUID的可能需要itegration在非常仔细地指定)。 - GUID creates a new group thus providing separation at both levels, at group level and name level, However,
DefaultExtendedPropertySet.PublicStrings
with non-generic name is also sufficient. Point is to avoid collision with named property created by some other vendor.PublicStrings
can also provide better discoverability if the application is to be integrated with some other applications (GUIDs might need to be very carefully specified during itegration). - Microsoft使用消息API(MAPI)作为一种手段来连接不同的邮件传输组件。该MAPI规范代表的大部分对象由属性标识符或PropIDs确定属性。
- 属性标识符是一组十六进制值的范围从1到0xFFFF(共65536)。
- 的历史上,舒适,这些属性分为逻辑组的。
- 标准MAPI属性或固定属性 - 低于
为0x8000
属性。这个范围被细分为:
- 可传输 - 此范围由Exchange可以与消息发送属性
- 内部 - 这个范围是由那些只能由Exchange设置的属性
- 非可传输 - 此范围代表未在组织外部传递的属性当Exchange将邮件传递
- Microsoft uses the Messaging API (MAPI) as a means to connect different messaging transport components. The MAPI specification represents most objects as properties identified by property identifiers or PropIDs.
- Property identifiers are a set of hexadecimal values that range from 1 to 0xFFFF (total 65536).
- Historically, for convinience, these properties are divided into logical groups.
- Standard MAPI properties or fixed properties - Properties below
0x8000
. This range is sub-divided into:- Transmittable - This range is made up of properties that Exchange can send with a message.
- Internal - This range is made up of properties that may be set only by Exchange.
- Non transmittable - This range represents properties that are not delivered outside the organization when Exchange delivers a message
- 与数字的名称属性 - 由如微软的Outlook程序;这些属性名称在源文件中定义
- 与字符串名称属性 - 这些特性与他们的名字以及相关的GUID,从而使开发人员能够划分命名属性为财产sets.Every GUID表示属性集,从而与他们有联系相同GUID的所有命名属性属于同一个属性集。
- Properties with numeric names - used by programs such as MS Outlook; these property names are generally defined in a source file.
- Properties with string names - these properties have GUIDs associated with them along with names, thus allowing developers to divide named properties into property sets.Every GUID represents a property set, thus all named properties with same GUID associated with them belongs to the same property set.
RFC822的X-header到MAPI属性转换
- 在互联网上发送的邮件格式邮件/ RFC822其中有一组属性称为支持发送的 X-头
- 转换从RFC822 X-标题键值对到MAPI属性被称为组件完成的 Imail的
- 因此,如果在绑定消息的X-header,Imail的将创建一个名为属性,并将其存放的消息。
有一些细微的历史细节,如
There are some subtle historical details such as
- Imail的重新写在Exchange 2000中包含的特设头这反过来包含的X-header。
- 由于没有对MAPI的特性,配额分配给他们的Exchange服务器
- 从版本以下的事情Exchange服务器版本上的数字(65536)的限制,由于被改变不同的设计决定:
- 其中MAPI属性将保持像一个特定的邮件或跨整个邮箱数据库
- 规则保留GUID和一个名称来阅读更多的细节在下面的链接MAPI属性
- Imail was re-written in Exchange 2000 to include Ad-hoc headers which in turn included x-headers.
- Since there is a limitation on number (65536) of MAPI-properties, quotas are assigned to them on Exchange server
- From versions to versions of Exchange server following things are changed due to different design decisions:
- where MAPI properties will be maintained like on a particular mail or across whole mailbox database
- rules to reserve GUID and a name to a MAPI property
:
- 的 http://technet.microsoft.com/en-us/library/bb851492(v = EXCHG.80)的.aspx
- http://technet.microsoft.com/en-美国/库/ jj937955(v = EXCHG.141)的.aspx
- 的 http://technet.microsoft.com/en-us/library/bb851493(v = EXCHG.80)的.aspx
- 的http://博客.technet.com / b /交换/存档/ 2010/07/29 / 3410545.aspx
- 的 http://blogs.technet.com/b/exchange/archive/2009/04/06/3407221.aspx
- http://technet.microsoft.com/en-us/library/bb851492(v=exchg.80).aspx
- http://technet.microsoft.com/en-us/library/jj937955(v=exchg.141).aspx
- http://technet.microsoft.com/en-us/library/bb851493(v=exchg.80).aspx
- http://blogs.technet.com/b/exchange/archive/2010/07/29/3410545.aspx
- http://blogs.technet.com/b/exchange/archive/2009/04/06/3407221.aspx
这篇关于我应该使用GUID或DefaultExtendedPropertySet.PublicStrings在构造ExtendedPropertyDefinition?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
推荐答案
即时答案我自己的问题如下所示。但看完后,我意识到还有很多相关的东西就知道了。所以这些事情后面的答案。
Immediate answers to my own questions are as below. But after reading I realized there are many more related things to know. So those things follows the answer.
Q1。
Q2。
MAPI属性