
Reactive Programming
Reactive Extensions (Rx), IObservable, operators, schedulers, backpressure (optional, less common in modern web APIs)
1What is the IObservable<T> interface in Reactive Extensions (Rx.NET)?
What is the IObservable<T> interface in Reactive Extensions (Rx.NET)?
Odpowiedź
IObservable<T> is the fundamental interface in Rx.NET that represents a push-based data source. It exposes a Subscribe method allowing observers to subscribe to receive asynchronous notifications. It's the reactive counterpart to IEnumerable<T>: while IEnumerable pulls data synchronously, IObservable pushes data asynchronously to subscribers.
2What are the three methods of the IObserver<T> interface in Rx.NET?
What are the three methods of the IObserver<T> interface in Rx.NET?
Odpowiedź
IObserver<T> defines three methods: OnNext(T value) to receive each element of the sequence, OnError(Exception error) to handle errors and signal the end of the sequence in case of failure, and OnCompleted() to indicate that the sequence completed successfully. These three methods form the observer contract which guarantees that after OnError or OnCompleted, no further OnNext will be called.
3What is the main difference between IEnumerable<T> and IObservable<T>?
What is the main difference between IEnumerable<T> and IObservable<T>?
Odpowiedź
IEnumerable<T> is a pull model where the consumer requests data synchronously with GetEnumerator() and MoveNext(). IObservable<T> is a push model where the source pushes data asynchronously to subscribers via Subscribe(). IEnumerable blocks the calling thread during iteration, while IObservable enables non-blocking operations and composition of asynchronous events with LINQ operators.
What is the role of the Select operator in Rx.NET?
How does the Where operator work in Rx.NET?
+21 pytań z rozmów
Inne tematy rekrutacyjne .NET
C# Basics
LINQ & Delegates
C# Language Essentials
ASP.NET Core Fundamentals
ASP.NET Core Request Lifecycle
Configuration & Settings
Application Lifecycle
Dependency Injection
Entity Framework Core
Minimal APIs
Web API Development
Async in ASP.NET Core
Authentication & Authorization
HttpClient & Networking
JSON Serialization
Entity Framework Core Advanced
C# Advanced Features
Clean Architecture
Logging, Monitoring & Observability
Unit Testing & xUnit
Integration Testing
Docker & Containerization
NuGet Package Management
Memory Management & GC
Async/await & Patterns
.NET Design Patterns
Performance Optimization
Security & Best Practices
SignalR & Real-time
Microservices Architecture
Opanuj .NET na następną rozmowę
Uzyskaj dostęp do wszystkich pytań, flashcards, testów technicznych, ćwiczeń code review i symulatorów rozmów.
Zacznij za darmo