Exemplo n.º 1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="scenarioSetsAsYaml">シナリオセットのYAML表現</param>
        internal UseCaseCatalog(IEnumerable <KeyValuePair <string, Dictionary <object, object> > > scenarioSetsAsYaml)
        {
            Contract.Requires(scenarioSetsAsYaml != null && scenarioSetsAsYaml.Any());

            ScenarioSets = scenarioSetsAsYaml.Select(scenario => UseCaseScenarioSet.CreateInstance(scenario.Key, scenario.Value));

            Title = ScenarioSets.First().Title;
        }
Exemplo n.º 2
0
        //
        // メソッド
        //

        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="fileName">ファイル名</param>
        /// <param name="lastUpdateTime">最終更新日時</param>
        /// <param name="title">タイトル</param>
        /// <param name="scenarioSetsAsYaml">シナリオセットのYAML表現</param>
        /// <param name="updateHistory">更新履歴</param>
        /// <param name="md">メタデータ</param>
        internal UseCaseCatalog(string fileName, DateTime lastUpdateTime, string title, IEnumerable <KeyValuePair <string, Dictionary <object, object> > > scenarioSetsAsYaml, IEnumerable <UseCaseUpdateInfo> updateHistory, IDictionary <object, object> md)
        {
            Contract.Requires(string.IsNullOrWhiteSpace(fileName) == false);
            Contract.Requires(title != null);
            Contract.Requires(scenarioSetsAsYaml != null && scenarioSetsAsYaml.Any() && scenarioSetsAsYaml.Any(scenarioSet => scenarioSet.Value == null) == false);
            Contract.Requires(updateHistory != null);
            Contract.Requires(md != null);

            FileName       = fileName;
            LastUpdateTime = lastUpdateTime;
            Title          = title;
            ScenarioSets   = scenarioSetsAsYaml.Select(scenario => UseCaseScenarioSet.CreateInstance(scenario.Key, scenario.Value));
            UpdateHistory  = updateHistory;

            metadata = new ReadOnlyDictionary <object, object>(md);
        }