Gets any text returned by the server indicating the action of the response.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property Operation As String |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As ImapResponse
Dim value As String
instance.Operation = value
value = instance.Operation |
| C# | |
|---|
public string Operation {get; set;} |
| Managed Extensions for C++ | |
|---|
public: __property string* get_Operation();
public: __property void set_Operation(
string* value
); |
Property Value
The text indicating the action if returned; otherwise an empty string.
Example
The following example demonstrates using the LineReceived event to detect values of RECENT and EXISTS responses.
| Visual Basic | Copy Code |
|---|
Private Sub ExamineTest()
' Login to the server.
Imap1.Login(Server, User, Pass)
' Examine a mailbox.
Dim Response As ImapResponse = Imap1.Examine("TestBox")
' Display the entire response from the server.
Debug.WriteLine("Entire response from server: " + Response.ToString())
End Sub
Private Sub Imap1_LineReceived(ByVal sender As Object, ByVal e As Dart.PowerTCP.Mail.ImapResponseEventArgs) Handles Imap1.LineReceived
Dim Response As ImapResponse
For Each Response in e.Responses
If Response.Operation = "EXISTS" Then
Debug.WriteLine("Value of EXISTS: " + Response.Value)
End If
If Response.Operation = "RECENT" Then
Debug.WriteLine("Value of RECENT: " + Response.Value)
End If
Next
End Sub |
| C# | Copy Code |
|---|
private void ExamineTest()
{
// Login to the server.
imap1.Login(Server, User, Pass);
// Examine a mailbox.
ImapResponse response = imap1.Examine("TestBox");
// Display the entire response from the server.
Debug.WriteLine("Entire response from server: " + response.ToString());
}
private void imap1_LineReceived(object sender, Dart.PowerTCP.Mail.ImapResponseEventArgs e)
{
foreach(ImapResponse response in e.Responses)
{
if(response.Operation == "EXISTS")
Debug.WriteLine("Value of EXISTS: " + response.Value);
if(response.Operation == "RECENT")
Debug.WriteLine("Value of RECENT: " + response.Value);
}
} |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0
See Also