-
Notifications
You must be signed in to change notification settings - Fork 12
/
GetAttachmentType.xml
161 lines (152 loc) · 8.47 KB
/
GetAttachmentType.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<Type Name="GetAttachmentType" FullName="ExchangeWebServices.GetAttachmentType">
<TypeSignature Language="C#" Value="public class GetAttachmentType : ExchangeWebServices.BaseRequestType" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit GetAttachmentType extends ExchangeWebServices.BaseRequestType" />
<TypeSignature Language="DocId" Value="T:ExchangeWebServices.GetAttachmentType" />
<TypeSignature Language="VB.NET" Value="Public Class GetAttachmentType
Inherits BaseRequestType" />
<TypeSignature Language="C++ CLI" Value="public ref class GetAttachmentType : ExchangeWebServices::BaseRequestType" />
<AssemblyInfo>
<AssemblyName>EWS</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>ExchangeWebServices.BaseRequestType</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.CodeDom.Compiler.GeneratedCode("wsdl", "2.0.50727.3038")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerCategory("code")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.DebuggerStepThrough</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Xml.Serialization.XmlType(Namespace="http://schemas.microsoft.com/exchange/services/2006/messages")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>The <see cref="T:ExchangeWebServices.GetAttachmentType" /> class represents a request to get attached items and files on an item in an Exchange database.</summary>
<remarks>
<para>Use the GetItem call to get the attachment identifiers to use in the GetAttachment operation.</para>
<para />
</remarks>
<example>
<para>The following code example shows a get attachment request for two attachments.</para>
<code>static void GetAttachment(ExchangeServiceBinding esb)
{
// Create the request.
<span class="label">GetAttachmentType</span><span class="label">request</span> = new GetAttachmentType();
// Create the response shape.
AttachmentResponseShapeType responseShape = new AttachmentResponseShapeType();
responseShape.BodyType = BodyTypeResponseType.Text;
responseShape.BodyTypeSpecified = true;
// Add the response shape to the request.
<span class="label">request</span>.AttachmentShape = responseShape;
// Identify the attachment IDs to get.
RequestAttachmentIdType[] ids = new RequestAttachmentIdType[2];
ids[0] = new RequestAttachmentIdType();
ids[1] = new RequestAttachmentIdType();
ids[0].Id = "AAAlAE1BQG1";
ids[1].Id = "AAAlAE1Bas";
// Add the attachment IDs to the request.
<span class="label">request</span>.AttachmentIds = ids;
try
{
GetAttachmentResponseType response = esb.GetAttachment(<span class="label">request</span>);
ResponseMessageType[] rmta = response.ResponseMessages.Items;
foreach (ResponseMessageType responseMessage in rmta)
{
AttachmentInfoResponseMessageType airmt = (responseMessage as AttachmentInfoResponseMessageType);
AttachmentType[] attachments = airmt.Attachments;
// Type check for item or file attachment.
foreach (AttachmentType attachment in attachments)
{
if (attachment is FileAttachmentType)
{
FileAttachmentType fat = (attachment as FileAttachmentType);
// Assumes ASCII encoding.
string myContent = ASCIIEncoding.ASCII.GetString(fat.Content);
}
// Attachment is item attachment.
else
{
ItemAttachmentType iat = (attachment as ItemAttachmentType);
// TODO: Handle the item attachment.
}
}
}
}
catch (Exception x)
{
Console.WriteLine(x.Message);
}
}</code>
</example>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public GetAttachmentType ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:ExchangeWebServices.GetAttachmentType.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 GetAttachmentType();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>EWS</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>The <see cref="T:ExchangeWebServices.GetAttachmentType" /> constructor initializes a new instance of the <see cref="T:ExchangeWebServices.GetAttachmentType" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AttachmentIds">
<MemberSignature Language="C#" Value="public ExchangeWebServices.RequestAttachmentIdType[] AttachmentIds { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class ExchangeWebServices.RequestAttachmentIdType[] AttachmentIds" />
<MemberSignature Language="DocId" Value="P:ExchangeWebServices.GetAttachmentType.AttachmentIds" />
<MemberSignature Language="VB.NET" Value="Public Property AttachmentIds As RequestAttachmentIdType()" />
<MemberSignature Language="C++ CLI" Value="public:
 property cli::array <ExchangeWebServices::RequestAttachmentIdType ^> ^ AttachmentIds { cli::array <ExchangeWebServices::RequestAttachmentIdType ^> ^ get(); void set(cli::array <ExchangeWebServices::RequestAttachmentIdType ^> ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>EWS</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Xml.Serialization.XmlArrayItem("AttachmentId", IsNullable=false, Namespace="http://schemas.microsoft.com/exchange/services/2006/types")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>ExchangeWebServices.RequestAttachmentIdType[]</ReturnType>
</ReturnValue>
<Docs>
<summary>The <see cref="P:ExchangeWebServices.GetAttachmentType.AttachmentIds" /> property gets or sets the identifiers of the attachments to return in the response. </summary>
<value>The <see cref="P:ExchangeWebServices.GetAttachmentType.AttachmentIds" /> property returns a <see cref="T:ExchangeWebServices.RequestAttachmentIdType" /> array that identifies the attachments to return.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AttachmentShape">
<MemberSignature Language="C#" Value="public ExchangeWebServices.AttachmentResponseShapeType AttachmentShape { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class ExchangeWebServices.AttachmentResponseShapeType AttachmentShape" />
<MemberSignature Language="DocId" Value="P:ExchangeWebServices.GetAttachmentType.AttachmentShape" />
<MemberSignature Language="VB.NET" Value="Public Property AttachmentShape As AttachmentResponseShapeType" />
<MemberSignature Language="C++ CLI" Value="public:
 property ExchangeWebServices::AttachmentResponseShapeType ^ AttachmentShape { ExchangeWebServices::AttachmentResponseShapeType ^ get(); void set(ExchangeWebServices::AttachmentResponseShapeType ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>EWS</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>ExchangeWebServices.AttachmentResponseShapeType</ReturnType>
</ReturnValue>
<Docs>
<summary>The <see cref="P:ExchangeWebServices.GetAttachmentType.AttachmentShape" /> property gets or sets which additional properties to return for the attachments.</summary>
<value>The <see cref="P:ExchangeWebServices.GetAttachmentType.AttachmentShape" /> property returns an <see cref="T:ExchangeWebServices.AttachmentResponseShapeType" /> that identifies which additional properties to return for attachments.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>