Table of Contents

Method Add

Namespace
Skyline.DataMiner.Net.Apps.Utils
Assembly
SLNetTypes.dll

Add(IDMAObjectRef, string, byte[])

Adds a new attachment to the IDMAObjectRef.

public void Add(IDMAObjectRef objectRef, string fileName, byte[] fileBytes)

Parameters

objectRef IDMAObjectRef

The ID of the object to add the attachment to.

fileName string

The name of the attachment.

fileBytes byte[]

The contents of the attachment.

Exceptions

ArgumentNullException

fileBytes, fileName, or objectRef is null.

DataMinerException

The InnerException will be an ArgumentException if the objectRef does not refer to an existing object.

The InnerException will be null if something went wrong during communication with the server.

DataMinerCOMException

The provided fileName contains a relative path (e.g. '../file.txt').

DataMinerSecurityException

The user does not have edit permissions for this object.