Method Add
Add(IDMAObjectRef, string, byte[])
Adds a new attachment to the Skyline.DataMiner.Net.IDMAObjectRef.
public void Add(IDMAObjectRef objectRef, string fileName, byte[] fileBytes)
Parameters
objectRef
IDMAObjectRefThe ID of the object to add the attachment to.
fileName
stringThe name of the attachment.
fileBytes
byte[]The contents of the attachment.
Exceptions
- ArgumentNullException
fileBytes
,fileName
, orobjectRef
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.