From 7cd851d2478ef290e2eba712264decbf119a4f34 Mon Sep 17 00:00:00 2001 From: Austin Benoit Date: Tue, 28 Oct 2025 10:03:12 -0400 Subject: [PATCH 1/2] Feat: add UseEmulator to the storage SDK --- docs/readme.md | 3 +++ storage/src/FirebaseStorage.cs | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/docs/readme.md b/docs/readme.md index e2d2dd31..e9f5c218 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -112,6 +112,9 @@ Release Notes ### Upcoming - Changes - Firebase AI: Add support for receiving Live API Transcripts. + - Storage: Add support for Firebase Storage emulator via `UseEmulator`. + The `UseEmulator` method should be called before invoking any other + methods on a new instance of Storage. Default port is 9199. ### 13.4.0 - Changes diff --git a/storage/src/FirebaseStorage.cs b/storage/src/FirebaseStorage.cs index c64b8306..a1363a84 100644 --- a/storage/src/FirebaseStorage.cs +++ b/storage/src/FirebaseStorage.cs @@ -258,6 +258,21 @@ public TimeSpan MaxOperationRetryTime { } } + /// + /// Configures the Storage SDK to use an emulated backend instead of + /// the default remote backend. This method should be called before invoking + /// any other methods on a new instance of Storage + /// + /// + /// The host that the storage emulator is running on. + /// + /// + /// The port that the storage emulator is running on. + /// + public void UseEmulator(string host, int port) { + storageInternal.UseEmulator(host, port); + } + /// /// Creates a new /// From dd8c03425ca436bb982b7cd94cf31a1f396fb01d Mon Sep 17 00:00:00 2001 From: Austin Benoit Date: Tue, 28 Oct 2025 10:45:37 -0400 Subject: [PATCH 2/2] Fix: fix spacing and xml tags --- storage/src/FirebaseStorage.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/src/FirebaseStorage.cs b/storage/src/FirebaseStorage.cs index a1363a84..3e823275 100644 --- a/storage/src/FirebaseStorage.cs +++ b/storage/src/FirebaseStorage.cs @@ -262,7 +262,7 @@ public TimeSpan MaxOperationRetryTime { /// Configures the Storage SDK to use an emulated backend instead of /// the default remote backend. This method should be called before invoking /// any other methods on a new instance of Storage - /// + /// /// /// The host that the storage emulator is running on. /// @@ -270,7 +270,7 @@ public TimeSpan MaxOperationRetryTime { /// The port that the storage emulator is running on. /// public void UseEmulator(string host, int port) { - storageInternal.UseEmulator(host, port); + storageInternal.UseEmulator(host, port); } ///