本文整理汇总了C#中VisualStudio.TryGetBool方法的典型用法代码示例。如果您正苦于以下问题:C# VisualStudio.TryGetBool方法的具体用法?C# VisualStudio.TryGetBool怎么用?C# VisualStudio.TryGetBool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VisualStudio
的用法示例。
在下文中一共展示了VisualStudio.TryGetBool方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadSettings
public override void LoadSettings(VisualStudio.IProjectSettings settings)
{
// TODO - Right now this class inherits from the view scaffolder model, so we need to call into the
// base class to read those settings as well. We want to remove this inheritance at some point
// and this method will have to change when we do.
base.LoadSettings(settings);
bool value;
if (IsViewGenerationSupported)
{
if (settings.TryGetBool(SavedSettingsKeys.IsViewGenerationSelectedKey, out value))
{
IsViewGenerationSelected = value;
}
else
{
// default to true if views are supported and we have no saved state
IsViewGenerationSelected = true;
}
}
if (IsAsyncSupported)
{
if (settings.TryGetBool(SavedSettingsKeys.IsAsyncSelectedKey, out value))
{
IsAsyncSelected = value;
}
}
}