本文整理汇总了C#中IContextBoundSettingsStore.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# IContextBoundSettingsStore.GetValue方法的具体用法?C# IContextBoundSettingsStore.GetValue怎么用?C# IContextBoundSettingsStore.GetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IContextBoundSettingsStore
的用法示例。
在下文中一共展示了IContextBoundSettingsStore.GetValue方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateProcess
/// <summary>
/// This method provides a <see cref="IDaemonStageProcess"/> instance which is assigned to highlighting a single document
/// </summary>
public IDaemonStageProcess CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind kind)
{
if (process == null)
throw new ArgumentNullException("process");
return new InjectionHappyDetectorDaemonStageProcess(process, settings.GetValue((InjectionHappyDetectorSettings s) => s.MaximumParameters));
}
示例2: CreateProcess
protected override IDaemonStageProcess CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings,
DaemonProcessKind processKind, ICSharpFile file)
{
if (processKind == DaemonProcessKind.VISIBLE_DOCUMENT &&
settings.GetValue(HighlightingSettingsAccessor.ColorUsageHighlightingEnabled))
{
return new UnityColorHighlighterProcess(process, settings, file);
}
return null;
}
示例3: CreateProcess
public IEnumerable<IDaemonStageProcess> CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind processKind)
{
if (process == null)
throw new ArgumentNullException("process");
return new[]
{
new MockMetricsDaemonStageProcess(process, settings.GetValue((MockMetricsSettings s) => s.ArrangeAmount))
};
}
示例4: CreateProcess
/// <summary>
/// This method provides a <see cref="IDaemonStageProcess"/> instance which is assigned to highlighting a single document
/// </summary>
public IEnumerable<IDaemonStageProcess> CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind kind)
{
if (process == null)
throw new ArgumentNullException("process");
return new[]
{
new ComplexityAnalysisDaemonStageProcess(
process, settings.GetValue((ComplexityAnalysisSettings s) => s.Threshold))
};
}
示例5: CreateProcess
public IEnumerable<IDaemonStageProcess> CreateProcess(IDaemonProcess process,
IContextBoundSettingsStore settings, DaemonProcessKind processKind)
{
if (process == null)
throw new ArgumentNullException("process");
return new[]
{
new DisposableFunctionDaemonStageProcess(process,
settings.GetValue((DisposePluginSettings s) => s.MaxLevel))
};
}
示例6: EnterSearchStringDialog
public EnterSearchStringDialog(IContextBoundSettingsStore settingsStore)
{
mySettingsStore = settingsStore;
InitializeComponent();
// Gettings previously saved state or default values from settings
string searchString = mySettingsStore.GetValue((FindTextSettings s) => s.LastUsedText) ?? string.Empty;
var searchFlags = mySettingsStore.GetValue((FindTextSettings s) => s.LastUsedFlags);
if (searchFlags == 0)
searchFlags = FindTextSearchFlags.All;
txtSearchString.Text = searchString;
txtSearchString.SelectAll();
if ((searchFlags & FindTextSearchFlags.StringLiterals) != FindTextSearchFlags.None)
cbSearchStrings.Checked = true;
if ((searchFlags & FindTextSearchFlags.Comments) != FindTextSearchFlags.None)
cbSearchComments.Checked = true;
if ((searchFlags & FindTextSearchFlags.Other) != FindTextSearchFlags.None)
cbSearchOther.Checked = true;
}
示例7: CreateProcess
/// <summary>
/// This method provides a <see cref="IDaemonStageProcess"/> instance which is assigned to highlighting a single document.
/// </summary>
/// <param name="process">
/// Current Daemon Process.
/// </param>
/// <param name="settingsStore">
/// The settingsStore store to use.
/// </param>
/// <param name="processKind">
/// The process kind.
/// </param>
/// <param name="file">
/// The file to analyze.
/// </param>
/// ///
/// <returns>
/// The current <see cref="IDaemonStageProcess"/>.
/// </returns>
protected override IDaemonStageProcess CreateProcess(
IDaemonProcess process, IContextBoundSettingsStore settingsStore, DaemonProcessKind processKind, ICSharpFile file)
{
StyleCopTrace.In(process, settingsStore, processKind, file);
if (process == null)
{
throw new ArgumentNullException("process");
}
try
{
if (processKind == DaemonProcessKind.OTHER)
{
StyleCopTrace.Info("ProcessKind Other.");
StyleCopTrace.Out();
return null;
}
if (!settingsStore.GetValue<StyleCopOptionsSettingsKey, bool>(key => key.AnalysisEnabled))
{
StyleCopTrace.Info("Analysis disabled.");
StyleCopTrace.Out();
return null;
}
if (!this.IsSupported(process.SourceFile))
{
StyleCopTrace.Info("File type not supported.");
StyleCopTrace.Out();
return null;
}
if (!this.FileIsValid(file))
{
StyleCopTrace.Info("Source file not valid.");
StyleCopTrace.Out();
return null;
}
if (!settingsStore.GetValue<StyleCopOptionsSettingsKey, bool>(key => key.AnalyzeReadOnlyFiles))
{
if (process.SourceFile.Properties.IsNonUserFile)
{
StyleCopTrace.Info("Not analysing non user files.");
StyleCopTrace.Out();
return null;
}
}
return StyleCopTrace.Out(new StyleCopStageProcess(process, settingsStore, file));
}
catch (JetBrains.Application.Progress.ProcessCancelledException)
{
return null;
}
}
示例8: IsEnabledInSettings
public AutopopupType IsEnabledInSettings(IContextBoundSettingsStore settingsStore, ITextControl textControl)
{
return (AutopopupType) settingsStore.GetValue(_settingsEntry, null);
}
示例9: CreateProcess
/// <summary>
/// This method provides a <see cref="IDaemonStageProcess"/> instance which is assigned to highlighting a single document.
/// </summary>
/// <param name="process">
/// Current Daemon Process.
/// </param>
/// <param name="settingsStore">
/// The settingsStore store to use.
/// </param>
/// <param name="processKind">
/// The process kind.
/// </param>
/// <returns>
/// The current <see cref="IDaemonStageProcess"/>.
/// </returns>
public override IDaemonStageProcess CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settingsStore, DaemonProcessKind processKind)
{
StyleCopTrace.In(process, settingsStore, processKind);
if (process == null)
{
throw new ArgumentNullException("process");
}
if (processKind == DaemonProcessKind.OTHER)
{
StyleCopTrace.Info("ProcessKind Other.");
StyleCopTrace.Out();
return null;
}
if (!settingsStore.GetValue<StyleCopOptionsSettingsKey, bool>(key => key.AnalysisEnabled))
{
StyleCopTrace.Info("Analysis disabled.");
StyleCopTrace.Out();
return null;
}
if (!this.IsSupported(process.SourceFile))
{
StyleCopTrace.Info("File type not supported.");
StyleCopTrace.Out();
return null;
}
if (!this.FileIsValid(process.SourceFile))
{
StyleCopTrace.Info("Source file not valid.");
StyleCopTrace.Out();
return null;
}
return StyleCopTrace.Out(new StyleCopStageProcess(process, settingsStore));
}
示例10: GetIntellisenseEnabledSpecific
protected override bool GetIntellisenseEnabledSpecific(IContextBoundSettingsStore boundSettingsStore)
{
return boundSettingsStore.GetValue((IntellisenseEnabledSettingPsi setting) => setting.IntellisenseEnabled);
}