Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDataServiceStreamProvider.DeleteStream Method

Deletes the associated media resource when a media link entry is deleted.

Namespace:  System.Data.Services.Providers
Assembly:  Microsoft.Data.Services (in Microsoft.Data.Services.dll)

void DeleteStream(
	Object entity,
	DataServiceOperationContext operationContext
)

Parameters

entity
Type: System.Object
The media link entry that is deleted.
operationContext
Type: System.Data.Services.DataServiceOperationContext
The DataServiceOperationContext instance that processes the request.

ExceptionCondition
ArgumentNullException

When entity or operationContext are null.

ArgumentException

When entity is not an entity that has a binary property to stream.

DataServiceException

When the stream associated with the entity cannot be deleted.

This method is invoked by the data services framework whenever an delete operation is being processed for the streams associated with the entity instance specified via the entity parameter. Notes to Interface Implementers If this method is being invoked as part of a request to delete the MLE and its associated stream (ie. MR): This method will be invoked AFTER IUpdatable.DeleteResource(entity) is called. An implementer of this method must be able to delete a stream even if the associated entity (passed as a parameter to this method) has already been removed from the underlying data source. The operationContext argument is passed as a means for this method to read the HTTP request headers provided with the delete request. An implementer of this method MUST NOT set the following HTTP response headers on the operationContext parameter as they are set by the data service runtime: Content-Type ETag An implementer of this method may set HTTP response headers (other than those forbidden above) on the operationContext parameter. An implementer of this method should only set the properties on the operationContext parameter which it requires to be set for a successful response. Altering other properties on the operationContext parameter may corrupt the response from the data service.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft