示例#1
0
        public TemplateViewModel(CodeTemplate template)
        {
            IsFromGeneration = true;
            Template         = template;

            //var replacements = template.FindReplacements();
            var replacements = template.FindAndFilterSimilarReplacements();

            GeneratedContent = template.GenerateContent(replacements);
            var rvms = replacements.Select(r => new ReplacementViewModel(r));

            Replacements = rvms.AsObservableCollection();
            AddReplacementChangedEventHandler();

            IsFromGeneration = false;
        }