本文整理汇总了C#中ISettingsManager.GetOrCreateSection方法的典型用法代码示例。如果您正苦于以下问题:C# ISettingsManager.GetOrCreateSection方法的具体用法?C# ISettingsManager.GetOrCreateSection怎么用?C# ISettingsManager.GetOrCreateSection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISettingsManager
的用法示例。
在下文中一共展示了ISettingsManager.GetOrCreateSection方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Load
public IEnumerable<object> Load(ISettingsManager settingsManager)
{
var section = settingsManager.GetOrCreateSection(SETTINGS_GUID);
foreach (var o in fileListLoader.Load(section.GetOrCreateSection(FILE_LISTS_SECTION)))
yield return o;
var tgws = new List<SerializedTabGroupWindow>();
var tgwsHash = new HashSet<string>();
foreach (var tgwSection in section.SectionsWithName(TABGROUPWINDOW_SECTION)) {
var tgw = SerializedTabGroupWindow.Load(tgwSection);
yield return null;
if (tgwsHash.Contains(tgw.Name))
continue;
tgws.Add(tgw);
}
// The files are added to the treeview with a slight delay. Make sure the files have
// been added to the TV or the node lookup code will fail to find the nodes it needs.
yield return LoaderConstants.Delay;
foreach (var o in fileTabSerializer.Restore(tgws))
yield return o;
fileTabManager.OnTabsLoaded();
}
示例2: BamlSettingsImpl
BamlSettingsImpl(ISettingsManager settingsManager) {
this.settingsManager = settingsManager;
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
this.DisassembleBaml = sect.Attribute<bool?>("DisassembleBaml") ?? this.DisassembleBaml;
this.disableSave = false;
}
示例3: LocalsSettingsImpl
LocalsSettingsImpl(ISettingsManager settingsManager) {
this.settingsManager = settingsManager;
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
ShowNamespaces = sect.Attribute<bool?>("ShowNamespaces") ?? ShowNamespaces;
ShowTypeKeywords = sect.Attribute<bool?>("ShowTypeKeywords") ?? ShowTypeKeywords;
ShowTokens = sect.Attribute<bool?>("ShowTokens") ?? ShowTokens;
this.disableSave = false;
}
示例4: MySettingsImpl
MySettingsImpl(ISettingsManager settingsManager) {
this.settingsManager = settingsManager;
// Read the settings from the file or use the default values if our settings haven't
// been saved to it yet.
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
BoolOption1 = sect.Attribute<bool?>("BoolOption1") ?? BoolOption1;
BoolOption2 = sect.Attribute<bool?>("BoolOption2") ?? BoolOption2;
StringOption3 = sect.Attribute<string>("StringOption3") ?? StringOption3;
this.disableSave = false;
}
示例5: DecompilerSettingsImpl
DecompilerSettingsImpl(ISettingsManager settingsManager)
{
this.settingsManager = settingsManager;
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
// Only read those settings that can be changed in the dialog box
this.DecompilationObject0 = sect.Attribute<DecompilationObject?>("DecompilationObject0") ?? this.DecompilationObject0;
this.DecompilationObject1 = sect.Attribute<DecompilationObject?>("DecompilationObject1") ?? this.DecompilationObject1;
this.DecompilationObject2 = sect.Attribute<DecompilationObject?>("DecompilationObject2") ?? this.DecompilationObject2;
this.DecompilationObject3 = sect.Attribute<DecompilationObject?>("DecompilationObject3") ?? this.DecompilationObject3;
this.DecompilationObject4 = sect.Attribute<DecompilationObject?>("DecompilationObject4") ?? this.DecompilationObject4;
this.AnonymousMethods = sect.Attribute<bool?>("AnonymousMethods") ?? this.AnonymousMethods;
this.ExpressionTrees = sect.Attribute<bool?>("ExpressionTrees") ?? this.ExpressionTrees;
this.YieldReturn = sect.Attribute<bool?>("YieldReturn") ?? this.YieldReturn;
this.AsyncAwait = sect.Attribute<bool?>("AsyncAwait") ?? this.AsyncAwait;
// this.AutomaticProperties = sect.Attribute<bool?>("AutomaticProperties") ?? this.AutomaticProperties;
// this.AutomaticEvents = sect.Attribute<bool?>("AutomaticEvents") ?? this.AutomaticEvents;
// this.UsingStatement = sect.Attribute<bool?>("UsingStatement") ?? this.UsingStatement;
// this.ForEachStatement = sect.Attribute<bool?>("ForEachStatement") ?? this.ForEachStatement;
// this.LockStatement = sect.Attribute<bool?>("LockStatement") ?? this.LockStatement;
// this.SwitchStatementOnString = sect.Attribute<bool?>("SwitchStatementOnString") ?? this.SwitchStatementOnString;
// this.UsingDeclarations = sect.Attribute<bool?>("UsingDeclarations") ?? this.UsingDeclarations;
this.QueryExpressions = sect.Attribute<bool?>("QueryExpressions") ?? this.QueryExpressions;
// this.FullyQualifyAmbiguousTypeNames = sect.Attribute<bool?>("FullyQualifyAmbiguousTypeNames") ?? this.FullyQualifyAmbiguousTypeNames;
// this.FullyQualifyAllTypes = sect.Attribute<bool?>("FullyQualifyAllTypes") ?? this.FullyQualifyAllTypes;
this.UseDebugSymbols = sect.Attribute<bool?>("UseDebugSymbols") ?? this.UseDebugSymbols;
// this.ObjectOrCollectionInitializers = sect.Attribute<bool?>("ObjectOrCollectionInitializers") ?? this.ObjectOrCollectionInitializers;
this.ShowXmlDocumentation = sect.Attribute<bool?>("ShowXmlDocumentation") ?? this.ShowXmlDocumentation;
this.RemoveEmptyDefaultConstructors = sect.Attribute<bool?>("RemoveEmptyDefaultConstructors") ?? this.RemoveEmptyDefaultConstructors;
// this.IntroduceIncrementAndDecrement = sect.Attribute<bool?>("IntroduceIncrementAndDecrement") ?? this.IntroduceIncrementAndDecrement;
// this.MakeAssignmentExpressions = sect.Attribute<bool?>("MakeAssignmentExpressions") ?? this.MakeAssignmentExpressions;
// this.AlwaysGenerateExceptionVariableForCatchBlocks = sect.Attribute<bool?>("AlwaysGenerateExceptionVariableForCatchBlocks") ?? this.AlwaysGenerateExceptionVariableForCatchBlocks;
this.ShowTokenAndRvaComments = sect.Attribute<bool?>("ShowTokenAndRvaComments") ?? this.ShowTokenAndRvaComments;
this.SortMembers = sect.Attribute<bool?>("SortMembers") ?? this.SortMembers;
this.ForceShowAllMembers = sect.Attribute<bool?>("ForceShowAllMembers") ?? this.ForceShowAllMembers;
this.SortSystemUsingStatementsFirst = sect.Attribute<bool?>("SortSystemUsingStatementsFirst") ?? this.SortSystemUsingStatementsFirst;
// this.MaxArrayElements = sect.Attribute<int?>("MaxArrayElements") ?? this.MaxArrayElements;
//TODO: CSharpFormattingOptions
this.disableSave = false;
}
示例6: HexEditorSettingsImpl
HexEditorSettingsImpl(ISettingsManager settingsManager)
{
this.settingsManager = settingsManager;
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
BytesGroupCount = sect.Attribute<int?>("BytesGroupCount") ?? BytesGroupCount;
BytesPerLine = sect.Attribute<int?>("BytesPerLine") ?? BytesPerLine;
UseHexPrefix = sect.Attribute<bool?>("UseHexPrefix") ?? UseHexPrefix;
ShowAscii = sect.Attribute<bool?>("ShowAscii") ?? ShowAscii;
LowerCaseHex = sect.Attribute<bool?>("LowerCaseHex") ?? LowerCaseHex;
FontFamily = new FontFamily(sect.Attribute<string>("FontFamily") ?? FontUtils.GetDefaultMonospacedFont());
FontSize = sect.Attribute<double?>("FontSize") ?? FontSize;
AsciiEncoding = sect.Attribute<AsciiEncoding?>("AsciiEncoding") ?? AsciiEncoding;
this.disableSave = false;
}
示例7: AnalyzerSettingsImpl
AnalyzerSettingsImpl(ISettingsManager settingsManager) {
this.settingsManager = settingsManager;
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
this.SyntaxHighlight = sect.Attribute<bool?>("SyntaxHighlight") ?? this.SyntaxHighlight;
this.ShowToken = sect.Attribute<bool?>("ShowToken") ?? this.ShowToken;
this.SingleClickExpandsChildren = sect.Attribute<bool?>("SingleClickExpandsChildren") ?? this.SingleClickExpandsChildren;
this.UseNewRenderer = sect.Attribute<bool?>("UseNewRenderer") ?? this.UseNewRenderer;
this.disableSave = false;
}
示例8: ILSettingsImpl
ILSettingsImpl(ISettingsManager settingsManager) {
this.settingsManager = settingsManager;
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
this.ShowILComments = sect.Attribute<bool?>("ShowILComments") ?? this.ShowILComments;
this.ShowXmlDocumentation = sect.Attribute<bool?>("ShowXmlDocumentation") ?? this.ShowXmlDocumentation;
this.ShowTokenAndRvaComments = sect.Attribute<bool?>("ShowTokenAndRvaComments") ?? this.ShowTokenAndRvaComments;
this.ShowILBytes = sect.Attribute<bool?>("ShowILBytes") ?? this.ShowILBytes;
this.SortMembers = sect.Attribute<bool?>("SortMembers") ?? this.SortMembers;
this.disableSave = false;
}
示例9: SearchSettingsImpl
SearchSettingsImpl(ISettingsManager settingsManager)
{
this.settingsManager = settingsManager;
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
this.SyntaxHighlight = sect.Attribute<bool?>("SyntaxHighlight") ?? this.SyntaxHighlight;
this.disableSave = false;
}
示例10: CallStackSettingsImpl
CallStackSettingsImpl(ISettingsManager settingsManager) {
this.settingsManager = settingsManager;
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
ShowModuleNames = sect.Attribute<bool?>("ShowModuleNames") ?? ShowModuleNames;
ShowParameterTypes = sect.Attribute<bool?>("ShowParameterTypes") ?? ShowParameterTypes;
ShowParameterNames = sect.Attribute<bool?>("ShowParameterNames") ?? ShowParameterNames;
ShowParameterValues = sect.Attribute<bool?>("ShowParameterValues") ?? ShowParameterValues;
ShowIP = sect.Attribute<bool?>("ShowIP") ?? ShowIP;
ShowOwnerTypes = sect.Attribute<bool?>("ShowOwnerTypes") ?? ShowOwnerTypes;
ShowNamespaces = sect.Attribute<bool?>("ShowNamespaces") ?? ShowNamespaces;
ShowTypeKeywords = sect.Attribute<bool?>("ShowTypeKeywords") ?? ShowTypeKeywords;
ShowTokens = sect.Attribute<bool?>("ShowTokens") ?? ShowTokens;
ShowReturnTypes = sect.Attribute<bool?>("ShowReturnTypes") ?? ShowReturnTypes;
this.disableSave = false;
}
示例11: FileTreeViewSettingsImpl
FileTreeViewSettingsImpl(ISettingsManager settingsManager)
{
this.settingsManager = settingsManager;
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
this.SyntaxHighlight = sect.Attribute<bool?>("SyntaxHighlight") ?? this.SyntaxHighlight;
this.SingleClickExpandsTreeViewChildren = sect.Attribute<bool?>("SingleClickExpandsTreeViewChildren") ?? this.SingleClickExpandsTreeViewChildren;
this.ShowAssemblyVersion = sect.Attribute<bool?>("ShowAssemblyVersion") ?? this.ShowAssemblyVersion;
this.ShowAssemblyPublicKeyToken = sect.Attribute<bool?>("ShowAssemblyPublicKeyToken") ?? this.ShowAssemblyPublicKeyToken;
this.ShowToken = sect.Attribute<bool?>("ShowToken") ?? this.ShowToken;
this.DeserializeResources = sect.Attribute<bool?>("DeserializeResources") ?? this.DeserializeResources;
this.MemberKind0 = sect.Attribute<MemberKind?>("MemberKind0") ?? this.MemberKind0;
this.MemberKind1 = sect.Attribute<MemberKind?>("MemberKind1") ?? this.MemberKind1;
this.MemberKind2 = sect.Attribute<MemberKind?>("MemberKind2") ?? this.MemberKind2;
this.MemberKind3 = sect.Attribute<MemberKind?>("MemberKind3") ?? this.MemberKind3;
this.MemberKind4 = sect.Attribute<MemberKind?>("MemberKind4") ?? this.MemberKind4;
this.disableSave = false;
}
示例12: SearchSettingsImpl
SearchSettingsImpl(ISettingsManager settingsManager) {
this.settingsManager = settingsManager;
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
this.SyntaxHighlight = sect.Attribute<bool?>("SyntaxHighlight") ?? this.SyntaxHighlight;
this.MatchWholeWords = sect.Attribute<bool?>("MatchWholeWords") ?? this.MatchWholeWords;
this.CaseSensitive = sect.Attribute<bool?>("CaseSensitive") ?? this.CaseSensitive;
this.MatchAnySearchTerm = sect.Attribute<bool?>("MatchAnySearchTerm") ?? this.MatchAnySearchTerm;
this.SearchDecompiledData = sect.Attribute<bool?>("SearchDecompiledData") ?? this.SearchDecompiledData;
this.SearchGacAssemblies = sect.Attribute<bool?>("SearchGacAssemblies") ?? this.SearchGacAssemblies;
this.disableSave = false;
}
示例13: FileManagerSettingsImpl
FileManagerSettingsImpl(ISettingsManager settingsManager)
{
this.settingsManager = settingsManager;
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
this.UseMemoryMappedIO = sect.Attribute<bool?>("UseMemoryMappedIO") ?? this.UseMemoryMappedIO;
this.LoadPDBFiles = sect.Attribute<bool?>("LoadPDBFiles") ?? this.LoadPDBFiles;
this.UseGAC = sect.Attribute<bool?>("UseGAC") ?? this.UseGAC;
this.disableSave = false;
}
示例14: FileTabManagerSettingsImpl
FileTabManagerSettingsImpl(ISettingsManager settingsManager)
{
this.settingsManager = settingsManager;
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
this.RestoreTabs = sect.Attribute<bool?>("RestoreTabs") ?? this.RestoreTabs;
this.DecompileFullType = sect.Attribute<bool?>("DecompileFullType") ?? this.DecompileFullType;
this.disableSave = false;
}
示例15: LanguageManagerSettingsImpl
LanguageManagerSettingsImpl(ISettingsManager settingsManager)
{
this.settingsManager = settingsManager;
this.disableSave = true;
var sect = settingsManager.GetOrCreateSection(SETTINGS_GUID);
this.LanguageGuid = sect.Attribute<Guid?>("LanguageGuid") ?? this.LanguageGuid;
this.disableSave = false;
}