Skip to content

Commit aaea7b3

Browse files
committed
Formatting and grammatical changes
1 parent b4de2de commit aaea7b3

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/Common/Commands.Common/AzurePSCmdlet.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,25 @@ public abstract class AzurePSCmdlet : PSCmdlet
3333
public AzureProfile Profile { get; set; }
3434

3535
/// <summary>
36-
/// Determines the current profile - the profile used when no Profile is explicitly passed in. Should only be used by
37-
/// Profile cmdlets and tests that needc to set up a particular profile
36+
/// Sets the current profile - the profile used when no Profile is explicitly passed in. Should be used only by
37+
/// Profile cmdlets and tests that need to set up a particular profile
3838
/// </summary>
39-
public static AzureProfile CurrentProfile {
39+
public static AzureProfile CurrentProfile
40+
{
4041
private get
4142
{
4243
if (_currentProfile == null)
4344
{
4445
_currentProfile = InitializeDefaultProfile();
45-
UpdateSessionStateForProfile(_currentProfile);
46+
SetTokenCacheForProfile(_currentProfile);
4647
}
4748

4849
return _currentProfile;
4950
}
5051

5152
set
5253
{
53-
UpdateSessionStateForProfile(value);
54+
SetTokenCacheForProfile(value);
5455
_currentProfile = value;
5556
}
5657
}
@@ -70,7 +71,7 @@ static AzurePSCmdlet()
7071
if (!TestMockSupport.RunningMocked)
7172
{
7273
InitializeTokenCaches();
73-
UpdateSessionStateForProfile(CurrentProfile);
74+
SetTokenCacheForProfile(CurrentProfile);
7475
AzureSession.DataStore = new DiskDataStore();
7576
}
7677
}
@@ -114,7 +115,7 @@ protected static void InitializeTokenCaches()
114115
/// Update the token cache when setting the profile
115116
/// </summary>
116117
/// <param name="profile"></param>
117-
protected static void UpdateSessionStateForProfile(AzureProfile profile)
118+
protected static void SetTokenCacheForProfile(AzureProfile profile)
118119
{
119120
var defaultProfilePath = Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile);
120121
if (string.Equals(profile.ProfilePath, defaultProfilePath, StringComparison.OrdinalIgnoreCase))
@@ -162,7 +163,7 @@ protected virtual void InitializeProfile()
162163
Profile = AzurePSCmdlet.CurrentProfile;
163164
}
164165

165-
UpdateSessionStateForProfile(Profile);
166+
SetTokenCacheForProfile(Profile);
166167
}
167168

168169
/// <summary>

0 commit comments

Comments
 (0)