public bool InserObjectRange(NativeMethods.WObject[] items)
{
// ignore 0-length array
if(items == null || items.Length == 0) {
return true;
}
// object can be inserted only when the context is stopped
if(_status != ContextStatus.Stopped) {
throw new Exception("Object can be inserted only when the context is stopped");
}
// insert the objects
int result = NativeMethods.ERRORCODE_SUCCESS;
int count = items.Length;
for(int i = 0; i < count; i++) {
result = NativeMethods.InsertWipeObject(_contextId, ref items[i]);
if(ValidResult(result) == false) {
return false;
}
}
return true;
}