VintaSoft Imaging .NET SDK 14.0: Documentation for .NET developer
Vintasoft.Data Namespace / StreamDataStorageOnDisk Class / LockItem Methods / LockItem(String,Boolean) Method
Syntax Exceptions Remarks Requirements SeeAlso
In This Topic
    LockItem(String,Boolean) Method (StreamDataStorageOnDisk)
    In This Topic
    Locks the stream in data storage and returns the locked stream.
    Syntax
    'Declaration
    
    Public Overloads Function LockItem( _
    ByVal key
    The stream filename.
    As System.String, _
    ByVal isReadOnly
    A value indicating whether the stream is read-only.
    As Boolean _
    ) As System.Object
    public System.Object LockItem(
    System.String key,
    bool isReadOnly
    )
    public: System.Object LockItem(
    System.String key,
    bool isReadOnly
    )
    public:
    System.Object LockItem(
    System.String key,
    bool isReadOnly
    )

    Parameters

    key
    The stream filename.
    isReadOnly
    A value indicating whether the stream is read-only.

    Return Value

    The stream, which was opened in read-write mode and without ability to share the file.
    Exceptions
    ExceptionDescription
    Thrown if key is null or empty.
    Remarks

    Method creates a file if file does not exist.

    Requirements

    Target Platforms: .NET9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also