@@ -394,24 +394,25 @@ public dynamic GetByReference(string aRef, params string[] fetchedFields)
394394 /// <param name="typePath">the type</param>
395395 /// <param name="oid">the object id</param>
396396 /// <returns>An OperationResult with information on the status of the request</returns>
397- public OperationResult Delete ( string typePath , long oid )
397+ public OperationResult Delete ( string workspaceRef , string typePath , long oid )
398398 {
399- return Delete ( string . Format ( "/{0}/{1}" , typePath , oid ) ) ;
399+ return Delete ( workspaceRef , string . Format ( "/{0}/{1}" , typePath , oid ) ) ;
400400 }
401401
402402 /// <summary>
403403 /// Delete the object described by the specified reference.
404404 /// </summary>
405405 /// <param name="aRef">the reference</param>
406406 /// <returns>An OperationResult with information on the status of the request</returns>
407- public OperationResult Delete ( string aRef )
407+ public OperationResult Delete ( string workspaceRef , string aRef )
408408 {
409409 var result = new OperationResult ( ) ;
410410 if ( ! aRef . Contains ( ".js" ) )
411411 {
412412 aRef = aRef + ".js" ;
413413 }
414- dynamic response = serializer . Deserialize ( Service . Delete ( GetFullyQualifiedUri ( aRef ) , GetProcessedHeaders ( ) ) ) ;
414+ String workspaceClause = workspaceRef == null ? "" : "?workspace=" + workspaceRef ;
415+ dynamic response = serializer . Deserialize ( Service . Delete ( GetFullyQualifiedUri ( aRef + workspaceClause ) , GetProcessedHeaders ( ) ) ) ;
415416 result . Errors . AddRange ( DecodeArrayList ( response . OperationResult . Errors ) ) ;
416417 result . Warnings . AddRange ( DecodeArrayList ( response . OperationResult . Warnings ) ) ;
417418 return result ;
@@ -420,6 +421,7 @@ public OperationResult Delete(string aRef)
420421 /// <summary>
421422 /// Create an object of the specified type from the specified object
422423 /// </summary>
424+ /// <param name="workspaceRef">the workspace into which the object should be created</param>
423425 /// <param name="typePath">the type to be created</param>
424426 /// <param name="obj">the object to be created</param>
425427 /// <returns></returns>
0 commit comments