Show / Hide Table of Contents

Class AttachmentHelper

Utility class for attachments helper methods.

Inheritance
object
AttachmentHelper
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOfficeCRMAttachment
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public static class AttachmentHelper

Methods

AddAttachmentsToMessage2Async(int, int[], CancellationToken)

TicketAgentImplementation::AddAttachments

Declaration
public static Task AddAttachmentsToMessage2Async(int ejMessageId, int[] attachmentIds, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int ejMessageId
int attachmentIds
CancellationToken cancellationToken
Returns
Type Description
Task
Exceptions
Type Condition
SoSentryException

AddAttachmentsToMessageAsync(int, int[], CancellationToken)

Declaration
public static Task AddAttachmentsToMessageAsync(int ejMessageId, int[] attachmentIds, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int ejMessageId
int attachmentIds
CancellationToken cancellationToken
Returns
Type Description
Task

DeleteAttachmentAsync(int, CancellationToken)

Deletes attachment from attachment table and from disk. It will NOT delete the link between the attachment and ticket, kb entry etc.

Declaration
public static Task DeleteAttachmentAsync(int attachmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int attachmentId

Id of attachment to delete

CancellationToken cancellationToken
Returns
Type Description
Task

GetAttachmentCountAsync(int, CancellationToken)

Declaration
public static Task<int> GetAttachmentCountAsync(int ticketId, CancellationToken cancellationToken)
Parameters
Type Name Description
int ticketId
CancellationToken cancellationToken
Returns
Type Description
Taskint

GetDefaultAttachmentLocationId()

Declaration
public static int GetDefaultAttachmentLocationId()
Returns
Type Description
int

HasAttachmentAccessAsync(int, EFieldRight, CancellationToken)

Declaration
public static Task<bool> HasAttachmentAccessAsync(int attachmentId, EFieldRight requiredRight, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int attachmentId
EFieldRight requiredRight
CancellationToken cancellationToken
Returns
Type Description
Taskbool

UpdateTicketHasAttachmentAsync(int, bool, CancellationToken)

Declaration
public static Task UpdateTicketHasAttachmentAsync(int ticketId, bool value, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int ticketId
bool value
CancellationToken cancellationToken
Returns
Type Description
Task
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top