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
objectRefIDMAObjectRefThe ID of the object to add the attachment to.
fileNamestringThe name of the attachment.
fileBytesbyte[]The contents of the attachment.
Exceptions
- ArgumentNullException
fileBytes,fileName, orobjectRefis null.- DataMinerException
The InnerException will be an ArgumentException if the
objectRefdoes 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.