Skip to content

Commit bd0ffbf

Browse files
committed
Fix issues that the Context is null even when it's indicated in parameter.
1 parent 769fd1a commit bd0ffbf

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/Common/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public string SrcContainer
173173
[Parameter(HelpMessage = "Source Azure Storage Context Object", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = FileParameterSet)]
174174
[Parameter(HelpMessage = "Source Azure Storage Context Object", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = FileToBlobParameterSet)]
175175
[Parameter(HelpMessage = "Source Azure Storage Context Object", ParameterSetName = UriParameterSet)]
176-
public new AzureStorageContext Context { get; set; }
176+
public override AzureStorageContext Context { get; set; }
177177

178178
[Parameter(HelpMessage = "Destination Storage context object", Mandatory = false)]
179179
public AzureStorageContext DestContext { get; set; }

src/Common/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class StorageCloudCmdletBase<T> : CloudBaseCmdlet<T>
4343
{
4444
[Parameter(HelpMessage = "Azure Storage Context Object",
4545
ValueFromPipelineByPropertyName = true)]
46-
public AzureStorageContext Context { get; set; }
46+
public virtual AzureStorageContext Context { get; set; }
4747

4848
[Parameter(HelpMessage = "The server time out for each request in seconds.")]
4949
public virtual int? ServerTimeoutPerRequest { get; set; }

src/Common/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public abstract class AzureStorageFileCmdletBase : StorageCloudCmdletBase<IStora
3434
ValueFromPipeline = true,
3535
ParameterSetName = Constants.SpecificParameterSetName,
3636
HelpMessage = "Azure Storage Context Object")]
37-
public new AzureStorageContext Context { get; set; }
37+
public override AzureStorageContext Context { get; set; }
3838

3939
protected FileRequestOptions RequestOptions
4040
{

src/Common/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageFileSasToken.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public string Policy
121121
ValueFromPipeline = true,
122122
HelpMessage = "Azure Storage Context Object",
123123
ParameterSetName = NameSasPolicyParmeterSet)]
124-
public new AzureStorageContext Context { get; set; }
124+
public override AzureStorageContext Context { get; set; }
125125

126126
/// <summary>
127127
/// Execute command

src/Common/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public string Policy
6868
[Parameter(
6969
ValueFromPipeline = true,
7070
HelpMessage = "Azure Storage Context Object")]
71-
public new AzureStorageContext Context { get; set; }
71+
public override AzureStorageContext Context { get; set; }
7272

7373
// Overwrite the useless parameter
7474
public override int? ServerTimeoutPerRequest { get; set; }

src/Common/Storage/Commands.Storage/File/Cmdlet/StartAzureStorageFileCopy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public class StartAzureStorageFileCopyCommand : StorageFileDataManagementCmdletB
120120
Mandatory = false,
121121
ValueFromPipelineByPropertyName = true,
122122
ParameterSetName = ShareNameParameterSet)]
123-
public new AzureStorageContext Context { get; set; }
123+
public override AzureStorageContext Context { get; set; }
124124

125125
[Parameter(HelpMessage = "Destination Storage context object", ParameterSetName = ContainerNameParameterSet)]
126126
[Parameter(HelpMessage = "Destination Storage context object", ParameterSetName = ContainerParameterSet)]

0 commit comments

Comments
 (0)