Compartilhar via


SPUtility.ExecuteCellStorageBinaryRequest Method (SPFile, Stream, Boolean, Guid, String, Boolean, String, Boolean, String, String, String, Int64, String, Int64, Boolean, String, Boolean, Int32, String, Boolean, Boolean)

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 _
) 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 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)
[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
)

Parameters

  • request
    Type: System.IO.Stream

    A binary stream that specifies the details of the update.

  • coalesce
    Type: System.Boolean

    Specifies whether all changes to the file are saved to the provider or to an intermediate cache. true to save all changes to the provider; otherwise, false to save all changes to an intermediate cache. For more information, see [MS-FSSHTTP], section 2.3.3.1.

  • partitionID
    Type: System.Guid

    A unique identifier 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.String

    The user name for the client. For more information, see UserNameType in [MS-FSSHTTP], section 2.3.2.6.

  • coauthVersioning
    Type: System.Boolean

    A message that specifies whether co-author versioning is true. When set to true, the versioning of the file is optimized for co-authoring, to prevent the protocol server from doing multiple version updates in a short period of time. If co-author versioning is set to false, then the protocol server MUST do versioning of the file every time the coalesce process runs. For more information, see [MS-FSSHTTP], section 2.3.3.1.

  • etagMatching
    Type: System.String

    A unique string that is updated every time the file contents are changed. The update occurs irrespective of which protocol client updated the file contents of a co-authorable file. For more information, see ETag

  • fExpectNoFileExists
    Type: System.Boolean

    A flag that determines whether to enforce a coherency verification during the upload process when the etagMatching is a null reference (Nothing in Visual Basic). If the etagMatching parameter is a null reference (Nothing in Visual Basic), the fExpectNoFileExists parameter is true, and a file already exists in the specified location, then the server must fail the upload with a coherency error. If the etagMatching parameter is a null reference (Nothing in Visual Basic), the fExpectNoFileExists parameter is false, and a file already exists in the specified location, then the server should overwrite the existing file.

  • bypassSchemaID
    Type: System.String

    The identifier that the client used to lock the file; the identifier was sent in an upload request. The server allows the upload to succeed if the BypassLockID matches the identifier of the lock on the file. If an upload request is sent without a BypassLockID, it will succeed only if the file is not already locked.

  • nLockType
    Type: System.Int64

    The type of lock granted in a co-authoring sub response or a schema lock subresponse. For more information, see [MS-FSSHTTP], section 2.2.5.8.

  • nTimeout
    Type: System.Int64

    The time in seconds that must elapse before the shared lock or exclusive lock associated with the specified file expires for the specified protocol client. For more information, see [MS-FSSHTTP], section 2.3.1.1.

  • createParentFolder
    Type: System.Boolean

    A message that specifies whether the parent folder needs to be created. For more information, see [MS-FSSHTTP], section 2.3.3.1.

  • etagReturn
    Type: System.String

    The file ETag property that was created after any edits have occurred.

  • allRequestSucceeded
    Type: System.Boolean

    A value that indicates whether the requests succeeded.

  • coalesceHRESULT
    Type: System.Int32

    The error code from the coalesce operation.

  • coalesceErrorMessage
    Type: System.String

    The error string from the coalesce operation.

  • containHotboxData
    Type: System.Boolean

    true if the server store returns some data contained in the hotbox; otherwise, false.

  • haveOnlyDemotionChanges
    Type: System.Boolean

    true to contain only changes from SharePoint demotion in the response to the request; otherwise, false. If this parameter is false, it must be ignored.

Return Value

Type: System.IO.Stream
The return stream.

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.

See Also

Reference

SPUtility Class

SPUtility Members

ExecuteCellStorageBinaryRequest Overload

Microsoft.SharePoint.Utilities Namespace