Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    NativeStreamWrapper Class

    Namespace: Stride.Core.IO
    Assembly: Stride.Core.dll
    System.Object → System.MarshalByRefObject → System.IO.Stream → NativeStream → NativeStreamWrapper
    Derived from NativeStreamWrapper:

    public class NativeStreamWrapper : NativeStream, IDisposable
    Name Description
    Constructors
    NativeStreamWrapper(Stream)
    Properties
    CanRead
    CanSeek
    CanTimeout
    CanWrite
    Length
    Position
    ReadTimeout
    WriteTimeout
    Methods
    CopyToAsync(Stream, Int32, CancellationToken)
    Flush()
    FlushAsync(CancellationToken)
    Read(Byte[], Int32, Int32)
    ReadAsync(Byte[], Int32, Int32, CancellationToken)
    ReadByte()
    Seek(Int64, SeekOrigin)
    SetLength(Int64)
    Write(Byte[], Int32, Int32)
    WriteAsync(Byte[], Int32, Int32, CancellationToken)
    WriteByte(Byte)
    | Improve this Doc View Source

    Constructors


    NativeStreamWrapper(Stream)

    public NativeStreamWrapper(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream
    | Improve this Doc View Source

    Properties


    CanRead

    public override bool CanRead { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    System.IO.Stream.CanRead

    CanSeek

    public override bool CanSeek { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    System.IO.Stream.CanSeek

    CanTimeout

    public override bool CanTimeout { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    System.IO.Stream.CanTimeout

    CanWrite

    public override bool CanWrite { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    System.IO.Stream.CanWrite

    Length

    public override long Length { get; }
    Property Value
    Type Description
    System.Int64
    Overrides
    System.IO.Stream.Length

    Position

    public override long Position { get; set; }
    Property Value
    Type Description
    System.Int64
    Overrides
    System.IO.Stream.Position

    ReadTimeout

    public override int ReadTimeout { get; set; }
    Property Value
    Type Description
    System.Int32
    Overrides
    System.IO.Stream.ReadTimeout

    WriteTimeout

    public override int WriteTimeout { get; set; }
    Property Value
    Type Description
    System.Int32
    Overrides
    System.IO.Stream.WriteTimeout
    | Improve this Doc View Source

    Methods


    CopyToAsync(Stream, Int32, CancellationToken)

    public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.IO.Stream destination
    System.Int32 bufferSize
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    System.IO.Stream.CopyToAsync(System.IO.Stream, System.Int32, System.Threading.CancellationToken)

    Flush()

    public override void Flush()
    Overrides
    System.IO.Stream.Flush()

    FlushAsync(CancellationToken)

    public override Task FlushAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    System.IO.Stream.FlushAsync(System.Threading.CancellationToken)

    Read(Byte[], Int32, Int32)

    public override int Read(byte[] buffer, int offset, int count)
    Parameters
    Type Name Description
    System.Byte[] buffer
    System.Int32 offset
    System.Int32 count
    Returns
    Type Description
    System.Int32
    Overrides
    System.IO.Stream.Read(System.Byte[], System.Int32, System.Int32)

    ReadAsync(Byte[], Int32, Int32, CancellationToken)

    public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Byte[] buffer
    System.Int32 offset
    System.Int32 count
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Int32>
    Overrides
    System.IO.Stream.ReadAsync(System.Byte[], System.Int32, System.Int32, System.Threading.CancellationToken)

    ReadByte()

    public override int ReadByte()
    Returns
    Type Description
    System.Int32
    Overrides
    System.IO.Stream.ReadByte()

    Seek(Int64, SeekOrigin)

    public override long Seek(long offset, SeekOrigin origin)
    Parameters
    Type Name Description
    System.Int64 offset
    System.IO.SeekOrigin origin
    Returns
    Type Description
    System.Int64
    Overrides
    System.IO.Stream.Seek(System.Int64, System.IO.SeekOrigin)

    SetLength(Int64)

    public override void SetLength(long value)
    Parameters
    Type Name Description
    System.Int64 value
    Overrides
    System.IO.Stream.SetLength(System.Int64)

    Write(Byte[], Int32, Int32)

    public override void Write(byte[] buffer, int offset, int count)
    Parameters
    Type Name Description
    System.Byte[] buffer
    System.Int32 offset
    System.Int32 count
    Overrides
    System.IO.Stream.Write(System.Byte[], System.Int32, System.Int32)

    WriteAsync(Byte[], Int32, Int32, CancellationToken)

    public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Byte[] buffer
    System.Int32 offset
    System.Int32 count
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    System.IO.Stream.WriteAsync(System.Byte[], System.Int32, System.Int32, System.Threading.CancellationToken)

    WriteByte(Byte)

    public override void WriteByte(byte value)
    Parameters
    Type Name Description
    System.Byte value
    Overrides
    System.IO.Stream.WriteByte(System.Byte)

    Inherited Members

    NativeStream.NativeStreamBufferSize
    NativeStream.nativeStreamBuffer
    NativeStream.ReadUInt16()
    NativeStream.ReadUInt32()
    NativeStream.ReadUInt64()
    NativeStream.Write(UInt16)
    NativeStream.Write(UInt32)
    NativeStream.Write(UInt64)
    NativeStream.Read(IntPtr, Int32)
    NativeStream.Write(IntPtr, Int32)
    System.IO.Stream.Null
    System.IO.Stream.BeginRead(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)
    System.IO.Stream.BeginWrite(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)
    System.IO.Stream.Close()
    System.IO.Stream.CopyTo(System.IO.Stream)
    System.IO.Stream.CopyTo(System.IO.Stream, System.Int32)
    System.IO.Stream.CopyToAsync(System.IO.Stream)
    System.IO.Stream.CopyToAsync(System.IO.Stream, System.Int32)
    System.IO.Stream.CreateWaitHandle()
    System.IO.Stream.Dispose()
    System.IO.Stream.Dispose(System.Boolean)
    System.IO.Stream.EndRead(System.IAsyncResult)
    System.IO.Stream.EndWrite(System.IAsyncResult)
    System.IO.Stream.FlushAsync()
    System.IO.Stream.ObjectInvariant()
    System.IO.Stream.ReadAsync(System.Byte[], System.Int32, System.Int32)
    System.IO.Stream.Synchronized(System.IO.Stream)
    System.IO.Stream.WriteAsync(System.Byte[], System.Int32, System.Int32)
    System.MarshalByRefObject.GetLifetimeService()
    System.MarshalByRefObject.InitializeLifetimeService()
    System.MarshalByRefObject.MemberwiseClone(System.Boolean)

    Extension Methods

    SocketExtensions.ReadAllAsync(Stream, Byte[], Int32, Int32)
    SocketExtensions.WriteInt32Async(Stream, Int32)
    SocketExtensions.ReadInt32Async(Stream)
    SocketExtensions.WriteInt16Async(Stream, Int16)
    SocketExtensions.ReadInt16Async(Stream)
    SocketExtensions.Write7BitEncodedInt(Stream, Int32)
    SocketExtensions.Read7BitEncodedInt(Stream)
    SocketExtensions.WriteStringAsync(Stream, String)
    SocketExtensions.ReadStringAsync(Stream)
    SocketExtensions.WriteGuidAsync(Stream, Guid)
    SocketExtensions.ReadGuidAsync(Stream)
    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    NativeStreamExtensions.ToNativeStream(Stream)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation