Skip to content

Commit 7fa3854

Browse files
Edits
1 parent 7845797 commit 7fa3854

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

articles/storage/files/storage-dotnet-how-to-use-files.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,11 @@ You can copy a file to a destination blob by using the following method from a `
412412
The following code example shows how to copy a file to a file in another file share:
413413
414414
```csharp
415+
using Azure.Core;
416+
using Azure.Identity;
417+
using Azure.Storage.Files.Shares;
418+
using Azure.Storage.Files.Shares.Models;
419+
415420
string accountName = "<account-name>";
416421
string srcShareName = "src-file-share";
417422
string destShareName = "dest-file-share";
@@ -447,6 +452,12 @@ A lease creates a lock on a file that's managed by Azure via a lease ID. The lea
447452
The following code example shows how to create a lease client, acquire a infinite duration lease on a file, and release the lease:
448453
449454
```csharp
455+
using Azure.Core;
456+
using Azure.Identity;
457+
using Azure.Storage.Files.Shares;
458+
using Azure.Storage.Files.Shares.Models;
459+
using Azure.Storage.Files.Shares.Specialized;
460+
450461
string accountName = "<account-name>";
451462
string shareName = "sample-file-share";
452463
string filePath = "path/to/file";
@@ -483,6 +494,9 @@ Share snapshots are read-only copies of a file share at a point in time. You can
483494
The following code example shows how to create a share snapshot, list the snapshots in a file share, and traverse the directory tree in a share snapshot:
484495
485496
```csharp
497+
using Azure.Storage.Files.Shares;
498+
using Azure.Storage.Files.Shares.Models;
499+
486500
string connectionString = "<connection-string>";
487501
488502
ShareServiceClient shareServiceClient = new ShareServiceClient(connectionString);
@@ -544,6 +558,13 @@ The management libraries are recommended for operations that are performed at th
544558
The following code example shows how to create a top-level `ArmClient` object, register the Storage resource provider with a subscription, and create a file share using the Azure Storage management library:
545559
546560
```csharp
561+
using Azure;
562+
using Azure.Core;
563+
using Azure.Identity;
564+
using Azure.ResourceManager;
565+
using Azure.ResourceManager.Resources;
566+
using Azure.ResourceManager.Storage;
567+
547568
ArmClient armClient = new ArmClient(new DefaultAzureCredential());
548569
549570
// Create a resource identifier, then get the subscription resource

0 commit comments

Comments
 (0)