PipeReader Sınıf

Tanım

Kanal okuma tarafına erişim sağlayan bir sınıf tanımlar.Defines a class that provides access to a read side of pipe.

public ref class PipeReader abstract
public abstract class PipeReader
type PipeReader = class
Public MustInherit Class PipeReader
Devralma
PipeReader

Oluşturucular

PipeReader()

PipeReader sınıfının yeni bir örneğini başlatır.Initializes a new instance of the PipeReader class.

Yöntemler

AdvanceTo(SequencePosition)

Ardışık düzenin okuma imlecini, kullanılan verilerden sonra, verileri işlenmiş olarak işaretleyerek, ' a ileri kaydırır.Moves forward the pipeline's read cursor to after the consumed data, marking the data as processed.

AdvanceTo(SequencePosition, SequencePosition)

İşlem hattının okuma imlecini, kullanılan verilerden sonra, verileri işlendi, okundu ve incelenir olarak işaretleyerek bir yere kaydırır.Moves forward the pipeline's read cursor to after the consumed data, marking the data as processed, read and examined.

AsStream(Boolean)

StreamÖğesinin gösterimini döndürür PipeReader .Returns a Stream representation of the PipeReader.

CancelPendingRead()

ReadAsync(CancellationToken)İşlemin tamamlanmasına ve tamamlanmamasına neden olmadan bekleyen işlemi iptal eder PipeReader .Cancels the pending ReadAsync(CancellationToken) operation without causing it to throw and without completing the PipeReader. Bekleyen bir işlem yoksa, bu işlem sonraki işlemi iptal eder.If there is no pending operation, this cancels the next operation.

Complete(Exception)

Tüketicinin okumayı bitirdikten sonra, Producer 'a işaret eder.Signals to the producer that the consumer is done reading.

CompleteAsync(Exception)

Geçerli kanal okuyucu örneğini tamamlanmış olarak işaretler, yani bundan daha fazla veri okunmayacak.Marks the current pipe reader instance as being complete, meaning no more data will be read from it.

CopyToAsync(PipeWriter, CancellationToken)

İçindeki baytları zaman uyumsuz olarak okur PipeReader ve PipeWriter belirtilen arabellek boyutunu ve iptal belirtecini kullanarak bunları belirtilen şekilde yazar.Asynchronously reads the bytes from the PipeReader and writes them to the specified PipeWriter, using a specified buffer size and cancellation token.

CopyToAsync(Stream, CancellationToken)

İçindeki baytları zaman uyumsuz olarak okur PipeReader ve belirtilen bir iptal belirtecini kullanarak bunları belirtilen akışa yazar.Asynchronously reads the bytes from the PipeReader and writes them to the specified stream, using a specified cancellation token.

Create(Stream, StreamPipeReaderOptions)

Belirtilen bir PipeReader sarmalama oluşturur Stream .Creates a PipeReader wrapping the specified Stream.

Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.Determines whether the specified object is equal to the current object.

(Devralındığı yer: Object)
GetHashCode()

Varsayılan karma işlevi olarak işlev görür.Serves as the default hash function.

(Devralındığı yer: Object)
GetType()

TypeGeçerli örneği alır.Gets the Type of the current instance.

(Devralındığı yer: Object)
MemberwiseClone()

Geçerli bir basit kopyasını oluşturur Object .Creates a shallow copy of the current Object.

(Devralındığı yer: Object)
OnWriterCompleted(Action<Exception,Object>, Object)
Kullanımdan kalktı.

Kanal tarafı tamamlandığında yürütülen bir geri aramayı kaydeder PipeWriter .Registers a callback that executes when the PipeWriter side of the pipe is completed.

ReadAsync(CancellationToken)

Geçerli olmayan bir bayt dizisini zaman uyumsuz olarak okur PipeReader .Asynchronously reads a sequence of bytes from the current PipeReader.

ToString()

Geçerli nesneyi temsil eden dizeyi döndürür.Returns a string that represents the current object.

(Devralındığı yer: Object)
TryRead(ReadResult)

Verileri eşzamanlı olarak okumaya çalışır PipeReader .Attempts to synchronously read data the PipeReader.

Şunlara uygulanır