Skip to content

Fix for Bug 4751044#159

Merged
dragonfly91 merged 8 commits intodev1from
dev1-anudeeb
Oct 1, 2015
Merged

Fix for Bug 4751044#159
dragonfly91 merged 8 commits intodev1from
dev1-anudeeb

Conversation

@dragonfly91
Copy link
Copy Markdown

Fix for Bug 4751044 : Get-AzureRMBackupContainer will fail in older PSH versions with Venus addition

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing string comparision for enum, better use tryParseEnum method.
public static bool TryParse(string value, bool ignoreCase, out TEnum result) where TEnum : struct;
Actually I see Enum.Parse is being used at many places in powershell , this should bot be used . we shpuld use TryParse method to keep is compatibile with any new enum value coming in.

dragonfly91 pushed a commit that referenced this pull request Oct 1, 2015
Fix for Bug 4751044. Signed off by SureshT and Vsarg.
@dragonfly91 dragonfly91 merged commit f79d121 into dev1 Oct 1, 2015
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better use TryParse here also instead of Enum.Parse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants