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


C# IDictionary.ToImmutableDictionary方法代码示例

本文整理汇总了C#中IDictionary.ToImmutableDictionary方法的典型用法代码示例。如果您正苦于以下问题:C# IDictionary.ToImmutableDictionary方法的具体用法?C# IDictionary.ToImmutableDictionary怎么用?C# IDictionary.ToImmutableDictionary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDictionary的用法示例。


在下文中一共展示了IDictionary.ToImmutableDictionary方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ImmutableSentenceDomainModel

 public ImmutableSentenceDomainModel(ISentenceFormModel formModel, IDictionary<ISentenceForm, ISentenceFormDomain> domains)
     : base(ImmutableSentenceFormModel.CopyOf(formModel))
 {
     //if (!formModel.SentenceForms.SetEquals(domains.Keys))
     //    throw new Exception();
     _domains = domains.ToImmutableDictionary();
 }
开发者ID:druzil,项目名称:nggp-base,代码行数:7,代码来源:ImmutableSentenceDomainModel.cs

示例2: RuleSet

 /// <summary>
 /// Create a RuleSet.
 /// </summary>
 public RuleSet(string filePath, ReportDiagnostic generalOption, IDictionary<string, ReportDiagnostic> specificOptions, IEnumerable<RuleSetInclude> includes)
 {
     this.filePath = filePath;
     this.generalDiagnosticOption = generalOption;
     this.specificDiagnosticOptions = specificOptions == null ? ImmutableDictionary<string, ReportDiagnostic>.Empty : specificOptions.ToImmutableDictionary();
     this.includes = includes == null ? ImmutableArray<RuleSetInclude>.Empty : includes.ToImmutableArray();
 }
开发者ID:pheede,项目名称:roslyn,代码行数:10,代码来源:RuleSet.cs

示例3: Create

        /// <summary>
        /// Create a new instance of a workspace that can be populated by opening solution and project files.
        /// </summary>
        /// <param name="properties">The MSBuild properties used when interpreting project files.
        /// These are the same properties that are passed to msbuild via the /property:&lt;n&gt;=&lt;v&gt; command line argument.</param>
        /// <param name="hostServices">The <see cref="HostServices"/> used to configure this workspace.</param>
        public static MSBuildWorkspace Create(IDictionary<string, string> properties, HostServices hostServices)
        {
            if (properties == null)
            {
                throw new ArgumentNullException(nameof(properties));
            }

            if (hostServices == null)
            {
                throw new ArgumentNullException(nameof(hostServices));
            }

            return new MSBuildWorkspace(hostServices, properties.ToImmutableDictionary());
        }
开发者ID:noahstein,项目名称:roslyn,代码行数:20,代码来源:MSBuildWorkspace.cs

示例4: AnalyzerOptions

 public AnalyzerOptions(IEnumerable<AdditionalStream> additionalStreams, IDictionary<string, string> globalOptions)
 {
     this.AdditionalStreams = additionalStreams == null ? ImmutableArray<AdditionalStream>.Empty : additionalStreams.ToImmutableArray();
     this.GlobalOptions = globalOptions == null ? ImmutableDictionary<string, string>.Empty : globalOptions.ToImmutableDictionary();
 }
开发者ID:jerriclynsjohn,项目名称:roslyn,代码行数:5,代码来源:AnalyzerOptions.cs

示例5: ConwaysLife

 private ConwaysLife(int width, int height, IDictionary<Point, int> cellAge)
 {
     this.width = width;
     this.height = height;
     this.cellAge = cellAge.ToImmutableDictionary();
 }
开发者ID:levdimov,项目名称:kontur-kampus,代码行数:6,代码来源:ConwaysLife.cs

示例6: ParameterizedSql

 public ParameterizedSql(string sql, IDictionary<string, string> userInputVariables)
 {
     Sql = sql;
     UserInputVariables = userInputVariables.ToImmutableDictionary();
 }
开发者ID:tomvonclef,项目名称:LuceneQueryToSql,代码行数:5,代码来源:ParameterizedSql.cs


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