private TransformModelOptions MergeOptions(IEnumerable <TransformModelOptions> optionsList) { var result = new TransformModelOptions(); var bookmarks = new Dictionary <string, string>(); foreach (var options in optionsList) { // The model is shared if options defined in any template is shared if (options.IsShared) { result.IsShared = true; } // If one uid is defined in multiple templates, the value is undetermined if (options.Bookmarks != null) { foreach (var pair in options.Bookmarks) { bookmarks[pair.Key] = pair.Value; } } } result.Bookmarks = bookmarks; return(result); }
private TransformModelOptions MergeOptions(IEnumerable<TransformModelOptions> optionsList) { var result = new TransformModelOptions(); var bookmarks = new Dictionary<string, string>(); foreach (var options in optionsList) { // The model is shared if options defined in any template is shared if (options.IsShared) { result.IsShared = true; } // If one uid is defined in multiple templates, the value is undetermined if (options.Bookmarks != null) { foreach (var pair in options.Bookmarks) { bookmarks[pair.Key] = pair.Value; } } } result.Bookmarks = bookmarks; return result; }