SPUtility.ExecuteCellStorageBinaryRequest Method (SPFile, Stream, Boolean, Guid, String, Boolean, String, Boolean, String, String, String, Int64, String, Int64, Boolean, String, Boolean, Int32, String, Boolean, Boolean, Int32)
Executes a cell storage request on an SPFile object.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Available in SharePoint Online
Syntax
'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)> _
Public Shared Function ExecuteCellStorageBinaryRequest ( _
spfile As SPFile, _
request As Stream, _
coalesce As Boolean, _
ByRef partitionID As Guid, _
userName As String, _
coauthVersioning As Boolean, _
etagMatching As String, _
fExpectNoFileExists As Boolean, _
contentChangeUnit As String, _
clientFileID As String, _
bypassSchemaID As String, _
nLockType As Long, _
lockID As String, _
nTimeout As Long, _
createParentFolder As Boolean, _
<OutAttribute> ByRef etagReturn As String, _
<OutAttribute> ByRef allRequestSucceeded As Boolean, _
<OutAttribute> ByRef coalesceHRESULT As Integer, _
<OutAttribute> ByRef coalesceErrorMessage As String, _
<OutAttribute> ByRef containHotboxData As Boolean, _
<OutAttribute> ByRef haveOnlyDemotionChanges As Boolean, _
ByRef binaryReqCountQuota As Integer _
) As Stream
'Usage
Dim spfile As SPFile
Dim request As Stream
Dim coalesce As Boolean
Dim partitionID As Guid
Dim userName As String
Dim coauthVersioning As Boolean
Dim etagMatching As String
Dim fExpectNoFileExists As Boolean
Dim contentChangeUnit As String
Dim clientFileID As String
Dim bypassSchemaID As String
Dim nLockType As Long
Dim lockID As String
Dim nTimeout As Long
Dim createParentFolder As Boolean
Dim etagReturn As String
Dim allRequestSucceeded As Boolean
Dim coalesceHRESULT As Integer
Dim coalesceErrorMessage As String
Dim containHotboxData As Boolean
Dim haveOnlyDemotionChanges As Boolean
Dim binaryReqCountQuota As Integer
Dim returnValue As Stream
returnValue = SPUtility.ExecuteCellStorageBinaryRequest(spfile, _
request, coalesce, partitionID, userName, _
coauthVersioning, etagMatching, _
fExpectNoFileExists, contentChangeUnit, _
clientFileID, bypassSchemaID, nLockType, _
lockID, nTimeout, createParentFolder, _
etagReturn, allRequestSucceeded, _
coalesceHRESULT, coalesceErrorMessage, _
containHotboxData, haveOnlyDemotionChanges, _
binaryReqCountQuota)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
public static Stream ExecuteCellStorageBinaryRequest(
SPFile spfile,
Stream request,
bool coalesce,
ref Guid partitionID,
string userName,
bool coauthVersioning,
string etagMatching,
bool fExpectNoFileExists,
string contentChangeUnit,
string clientFileID,
string bypassSchemaID,
long nLockType,
string lockID,
long nTimeout,
bool createParentFolder,
out string etagReturn,
out bool allRequestSucceeded,
out int coalesceHRESULT,
out string coalesceErrorMessage,
out bool containHotboxData,
out bool haveOnlyDemotionChanges,
ref int binaryReqCountQuota
)
Parameters
spfile
Type: Microsoft.SharePoint.SPFileThe file that is being read or updated.
request
Type: System.IO.StreamA binary stream that specifies the details of the update.
coalesce
Type: System.BooleanSpecifies whether all changes to the file are saved to the provider or to an intermediate cache. If true, all changes to the file are saved to the provider; otherwise, the changes are saved to an intermediate cache. For more information, see [MS-FSSHTTP], section 2.3.3.1
partitionID
Type: System.GuidA unique identifier (ID) for the partition block that contains content or content-specific schema data to be updated. For more information, see [MS-FSSHTTP], section 3.1.1.
userName
Type: System.StringThe user name for the client. For more information, see UserNameType in [MS-FSSHTTP], section 2.3.2.6.
coauthVersioning
Type: System.BooleanWhether versioning of the file is optimized for co-authoring. If true, versioning of the file optimized for co-authoring is enabled; otherwise, versioning of the file is done every time the coalesce process runs. For more information, see [MS-FSSHTTP], section 2.3.3.1.
etagMatching
Type: System.StringA unique value that is updated every time the file contents are changed. The update occurs irrespective of which client updated the file contents of a co-authorable file. For more information, see ETag
fExpectNoFileExists
Type: System.BooleanWhether to enforce coherency verification during the upload process when etagMatching is null or an empty string. If true, the upload process fails and this method returns a coherency error if the etagMatching parameter is null or an empty string and the file exists; if false and the etagMatching parameter is null or an empty string and a file exists, the file is overwritten.
contentChangeUnit
Type: System.StringA value that uniquely identifies the synchronization version of the file content. For more information, see [MS-FSSHTTP], section 2.3.3.1.
clientFileID
Type: System.StringA value that uniquely identifies the file content. For more information, see [MS-FSSHTTP], section 2.3.3.1.
bypassSchemaID
Type: System.StringThe value that the client used to lock the file; the value was sent in a previous upload request. The upload succeeds if this value matches the value of the lock on the file. If this parameter is null or an empty string, this method succeeds only if the file is not locked.
nLockType
Type: System.Int64The type of lock granted in a co-authoring sub-response or a schema lock subresponse. For more information, see [MS-FSSHTTP], section 2.3.1.7.
lockID
Type: System.StringA value that specifies a unique identifier for an exclusive lock on the file. For more information, see [MS-FSSHTTP], section 2.2.5.8.
nTimeout
Type: System.Int64The time in seconds that must elapse before the shared lock or exclusive lock associated with the specified file expires. For more information, see [MS-FSSHTTP], section 2.3.1.1.
createParentFolder
Type: System.BooleanWhether the parent folder for the file needs to be created. If true, the parent folder needs to be created; otherwise it does not need to be created. For more information, see [MS-FSSHTTP], section 2.3.3.1.
etagReturn
Type: System.StringWhen this method returns, contains the ETag property that was created for the file after any edits have occurred. This parameter is passed uninitialized.
allRequestSucceeded
Type: System.BooleanWhen this method returns, contains a value that indicates whether the requests succeeded. This parameter is passed uninitialized.
coalesceHRESULT
Type: System.Int32When this method returns, contains the error code from the coalesce operation. This parameter is passed uninitialized.
coalesceErrorMessage
Type: System.StringWhen this method returns, contains any error from the coalesce operation. This parameter is passed uninitialized.
containHotboxData
Type: System.BooleanWhen this method returns, contains a value that indicates whether the server store returns some data contained in the hotbox. This parameter is passed uninitialized.
haveOnlyDemotionChanges
Type: System.BooleanWhen this method returns, contains whether only changes from SharePoint demotion in the response to the request are contained. If false, this parameter must be ignored. It is passed uninitialized.
binaryReqCountQuota
Type: System.Int32A value that limits the number of bytes for a binary request that is executed and passed by reference.
Return Value
Type: System.IO.Stream
The return stream.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | spfile or request is null . |
Remarks
The lifetime of the return stream is tied to the SPWeb object associated with the SPFile. Therefore, the SPWeb object cannot be disposed while the stream is in use.