ChatAttachmentEventArgs
Namespace: Wisej.Web.Ext.Syncfusion2
Assembly: Wisej.Web.Ext.Syncfusion2 (4.1.0.0)
Carries attachment details for chat upload, remove, and click operations.
- C#
- VB.NET
public class ChatAttachmentEventArgs : ChatCancelableEventArgs
Public Class ChatAttachmentEventArgs
Inherits ChatCancelableEventArgs
Constructors
ChatAttachmentEventArgs(attachment, files, message, chunkSize, currentChunkIndex, operation, postRawFile, statusText, currentRequest, customFormData, response, cancel, name, data)
Initializes a new instance of the ChatAttachmentEventArgs class.
| Name | Type | Description |
|---|---|---|
| attachment | ChatAttachment | The file the operation refers to. |
| files | ChatAttachment[] | All the files involved in the operation. |
| message | ChatMessage | The message that contains the attachment, or null. |
| chunkSize | Int32 | The chunk size reported by the uploader, or 0 when it is not available. |
| currentChunkIndex | Int32 | The index of the current chunk reported by the uploader, or -1 when it is not available. |
| operation | String | The name of the uploader operation. A null value is stored as an empty string. |
| postRawFile | Boolean | The postRawFile flag reported by the uploader. |
| statusText | String | The status text reported by the uploader. A null value is stored as an empty string. |
| currentRequest | Object | The request information reported by the uploader, or null. |
| customFormData | Object | The custom form data reported by the uploader, or null. |
| response | Object | The response information reported by the uploader, or null. |
| cancel | Boolean | The initial value of Cancel. |
| name | String | The name of the client event. |
| data | Object | The raw event data received from the browser, or null. |
Example:
The following example, placed in a class derived from Chat, raises AttachmentClick for the attachment of a message.
ChatMessage message = this.Messages[0];
ChatAttachment file = message.AttachedFile;
this.OnAttachmentClick(new ChatAttachmentEventArgs(
file, new[] { file }, message,
0, -1, "", false, "",
null, null, null,
false, "attachmentClick", null));
Properties
Attachment
ChatAttachment: Gets the file the operation refers to: the file that was clicked, uploaded or removed.
When the browser does not identify a single file, the value is the first entry of Files. It can be null when the browser reports no file at all.
ChunkSize
Int32: Gets the chunk size reported by the uploader for chunked uploads, or 0 when it is not available.
CurrentChunkIndex
Int32: Gets the index of the chunk being uploaded, or -1 when it is not available.
CurrentRequest
Object: Gets the request information reported by the uploader, or null when there is none.
The value is a dynamic object that contains only the simple fields that the client wrapper could copy from the uploader event.
CustomFormData
Object: Gets the custom form data reported by the uploader, or null when there is none.
Files
ChatAttachment[]: Gets all the files involved in the operation.
The value can be null when the browser reports no file list.
Message
ChatMessage: Gets the message that contains the attachment.
The message is reported only by AttachmentClick, when the browser provides it. The value is null for the upload and remove events, which refer to files that are still in the composer.
Operation
String: Gets the name of the uploader operation reported by the browser, or an empty string when it is not available.
PostRawFile
Boolean: Gets the postRawFile flag reported by the uploader.
Response
Object: Gets the response information reported by the uploader, or null when there is none.
The value is a dynamic object that contains only the simple fields that the client wrapper could copy from the uploader event.
StatusText
String: Gets the status text reported by the uploader, or an empty string when it is not available.