当前位置: 首页>>代码示例>>C#>>正文


C# ISettingsManager.GetOrCreateSection方法代码示例

本文整理汇总了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();
        }
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:26,代码来源:FileTabManagerLoader.cs

示例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;
		}
开发者ID:GreenDamTan,项目名称:dnSpy,代码行数:8,代码来源:BamlSettings.cs

示例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;
		}
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:10,代码来源:LocalsSettings.cs

示例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;
		}
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:13,代码来源:MySettings.cs

示例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;
        }
开发者ID:yueding,项目名称:dnSpy,代码行数:41,代码来源:DecompilerSettingsImpl.cs

示例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;
        }
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:16,代码来源:HexEditorSettings.cs

示例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;
		}
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:11,代码来源:AnalyzerSettings.cs

示例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;
		}
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:12,代码来源:ILSettings.cs

示例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;
        }
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:9,代码来源:SearchSettings.cs

示例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;
		}
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:17,代码来源:CallStackSettings.cs

示例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;
        }
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:19,代码来源:FileTreeViewSettings.cs

示例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;
		}
开发者ID:GreenDamTan,项目名称:dnSpy,代码行数:13,代码来源:SearchSettings.cs

示例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;
        }
开发者ID:GreenDamTan,项目名称:dnSpy,代码行数:11,代码来源:FileManagerSettings.cs

示例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;
        }
开发者ID:GreenDamTan,项目名称:dnSpy,代码行数:10,代码来源:FileTabManagerSettings.cs

示例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;
        }
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:9,代码来源:LanguageManagerSettings.cs


注:本文中的ISettingsManager.GetOrCreateSection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。