Skip to content

Commit

Permalink
removed unused code (#24415)
Browse files Browse the repository at this point in the history
  • Loading branch information
yifanz7 authored Mar 21, 2024
1 parent c3bef5f commit 338fa3b
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@ public string Container
[Parameter(HelpMessage = "Force to overwrite the existing file.")]
public SwitchParameter Force { get; set; }

protected override bool UseTrack2Sdk()
{
return true;
}

/// <summary>
/// Initializes a new instance of the RemoveStorageAzureBlobCommand class.
/// </summary>
Expand Down
4 changes: 0 additions & 4 deletions src/Storage/Storage/Blob/Cmdlet/GetAzureStorageBlobByTag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ public int? MaxCount

// Overwrite the useless parameter
public override string TagCondition { get; set; }
protected override bool UseTrack2Sdk()
{
return true;
}

/// <summary>
/// Initializes a new instance of the GetAzureStorageBlobByTagCommand class.
Expand Down
21 changes: 0 additions & 21 deletions src/Storage/Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ public string Policy
public override int? ConcurrentTaskCount { get; set; }
public override string TagCondition { get; set; }

protected override bool UseTrack2Sdk()
{
return true;
}

/// <summary>
/// Initializes a new instance of the NewAzureStorageBlobSasCommand class.
/// </summary>
Expand Down Expand Up @@ -259,22 +254,6 @@ private string GetBlobSharedAccessSignature(CloudBlob blob, SharedAccessBlobPoli
}
}

/// <summary>
/// Update the access policy
/// </summary>
/// <param name="accessPolicy">Access policy object</param>
/// <param name="shouldSetExpiryTime">Should set the default expiry time</param>
private void SetupAccessPolicy(SharedAccessBlobPolicy accessPolicy, bool shouldSetExpiryTime)
{
AccessPolicyHelper.SetupAccessPolicyPermission(accessPolicy, Permission);
DateTimeOffset? accessStartTime;
DateTimeOffset? accessEndTime;
SasTokenHelper.SetupAccessPolicyLifeTime(StartTime, ExpiryTime,
out accessStartTime, out accessEndTime, shouldSetExpiryTime);
accessPolicy.SharedAccessStartTime = accessStartTime;
accessPolicy.SharedAccessExpiryTime = accessEndTime;
}

/// <summary>
/// Get CloudBlob object by name
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ public string Policy
public override int? ClientTimeoutPerRequest { get; set; }
public override int? ConcurrentTaskCount { get; set; }
public override string TagCondition { get; set; }
protected override bool UseTrack2Sdk()
{
return true;
}

/// <summary>
/// Initializes a new instance of the NewAzureStorageContainerSasCommand class.
Expand Down Expand Up @@ -173,21 +169,5 @@ public override void ExecuteCmdlet()
WriteObject(sasToken);
}
}

/// <summary>
/// Update the access policy
/// </summary>
/// <param name="policy">Access policy object</param>
/// <param name="shouldSetExpiryTime">Should set the default expiry time</param>
private void SetupAccessPolicy(SharedAccessBlobPolicy policy, bool shouldSetExpiryTime)
{
DateTimeOffset? accessStartTime;
DateTimeOffset? accessEndTime;
SasTokenHelper.SetupAccessPolicyLifeTime(StartTime, ExpiryTime,
out accessStartTime, out accessEndTime, shouldSetExpiryTime);
policy.SharedAccessStartTime = accessStartTime;
policy.SharedAccessExpiryTime = accessEndTime;
AccessPolicyHelper.SetupAccessPolicyPermission(policy, Permission);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ public class NewAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlo

[Parameter(HelpMessage = "Expiry Time")]
public DateTime? ExpiryTime { get; set; }

protected override bool UseTrack2Sdk()
{
return true;
}

// Overwrite the useless parameter
public override string TagCondition { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@ public string Container
}
private string ContainerName = String.Empty;



protected override bool UseTrack2Sdk()
{
return true;
}

/// <summary>
/// Initializes a new instance of the RemoveStorageAzureBlobCommand class.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ public string PolicyMode
}
private BlobImmutabilityPolicyMode? policyMode = null;

protected override bool UseTrack2Sdk()
{
return true;
}

/// <summary>
/// Initializes a new instance of the RemoveStorageAzureBlobCommand class.
/// </summary>
Expand Down
5 changes: 0 additions & 5 deletions src/Storage/Storage/Blob/Cmdlet/SetAzStorageBlobLegalHold.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ public string Container
[Parameter(HelpMessage = "Disable LegalHold on the Blob.", Mandatory = true, ParameterSetName = BlobPipelineDisableParameterSet)]
public SwitchParameter DisableLegalHold { get; set; }

protected override bool UseTrack2Sdk()
{
return true;
}

/// <summary>
/// Initializes a new instance of the RemoveStorageAzureBlobCommand class.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ public class SetAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlo
[Parameter(HelpMessage = "Set ExpiryTime as null for the policy")]
public SwitchParameter NoExpiryTime { get; set; }

protected override bool UseTrack2Sdk()
{
return true;
}

// Overwrite the useless parameter
public override string TagCondition { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ public class NewAzureStorageAccountSasTokenCommand : StorageCloudBlobCmdletBase
public override int? ConcurrentTaskCount { get; set; }
public override string TagCondition { get; set; }

protected override bool UseTrack2Sdk()
{
return true;
}

/// <summary>
/// Initializes a new instance of the NewAzureStorageAccountSasTokenCommand class.
/// </summary>
Expand Down

0 comments on commit 338fa3b

Please sign in to comment.