public ImmutableSentenceDomainModel(ISentenceFormModel formModel, IDictionary<ISentenceForm, ISentenceFormDomain> domains) : base(ImmutableSentenceFormModel.CopyOf(formModel)) { //if (!formModel.SentenceForms.SetEquals(domains.Keys)) // throw new Exception(); _domains = domains.ToImmutableDictionary(); }
/// <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(); }
/// <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:<n>=<v> 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()); }
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(); }
private ConwaysLife(int width, int height, IDictionary<Point, int> cellAge) { this.width = width; this.height = height; this.cellAge = cellAge.ToImmutableDictionary(); }
public ParameterizedSql(string sql, IDictionary<string, string> userInputVariables) { Sql = sql; UserInputVariables = userInputVariables.ToImmutableDictionary(); }