public string GetEmail(PathGeneratorType generator) { var pathGenerator = _assetPathGeneratorFactory.GetGenerator(generator); string htmlBody = File.ReadAllText(pathGenerator.GeneratePath(Constants.EmailTemplatePath)); return(htmlBody); }
public IAssetPathGenerator GetGenerator(PathGeneratorType generator) { switch (generator) { case PathGeneratorType.Server: return(new ServerPathGenerator()); case PathGeneratorType.Notification: return(new NotificationPathGenerator()); default: return(null); } }
public static string GetEmail(PathGeneratorType generator) { var pathGeneratorFactory = new AssetPathGeneratorFactory(); var pathGenerator = pathGeneratorFactory.GetGenerator(generator); string htmlBody = File.ReadAllText(pathGenerator.GeneratePath(Constants.EmailTemplatePath)); inlineDCodeLogo = new LinkedResource(pathGenerator.GeneratePath(Constants.DCodeLogoPath)); inlineDCodeLogo.ContentId = Guid.NewGuid().ToString(); inlineDeloitteLogo = new LinkedResource(pathGenerator.GeneratePath(Constants.Deloittepath)); inlineDeloitteLogo.ContentId = Guid.NewGuid().ToString(); return(htmlBody); }
/// <summary> /// Initializes a new instance of the <see cref="TypeGenerator"/> class. /// </summary> public TypeGenerator() { Generators = new Dictionary <Type, IGeneratorType>(); IGeneratorType textBlock = new TextBlockGeneratorType(); Generators.Add(textBlock.XamlType, textBlock); IGeneratorType stackPanel = new StackPanelGeneratorType(); Generators.Add(stackPanel.XamlType, stackPanel); IGeneratorType uiRoot = new UIRootGeneratorType(); Generators.Add(uiRoot.XamlType, uiRoot); IGeneratorType border = new BorderGeneratorType(); Generators.Add(border.XamlType, border); IGeneratorType button = new ButtonGeneratorType(); Generators.Add(button.XamlType, button); IGeneratorType control = new ControlGeneratorType(); Generators.Add(control.XamlType, control); IGeneratorType contentControl = new ContentControlGeneratorType(); Generators.Add(contentControl.XamlType, contentControl); IGeneratorType presenter = new ContentPresenterGeneratorType(); Generators.Add(presenter.XamlType, presenter); IGeneratorType toggle = new ToggleButtonGeneratorType(); Generators.Add(toggle.XamlType, toggle); IGeneratorType checkBox = new CheckBoxGeneratorType(); Generators.Add(checkBox.XamlType, checkBox); IGeneratorType itemsControl = new ItemsControlGeneratorType(); Generators.Add(itemsControl.XamlType, itemsControl); IGeneratorType combo = new ComboBoxGeneratorType(); Generators.Add(combo.XamlType, combo); IGeneratorType dataGrid = new DataGridGeneratorType(); Generators.Add(dataGrid.XamlType, dataGrid); IGeneratorType dataGridColumn = new DataGridColumnGeneratorType(); Generators.Add(dataGridColumn.XamlType, dataGridColumn); IGeneratorType dataGridBoundColumn = new DataGridBoundColumnGeneratorType(); Generators.Add(dataGridBoundColumn.XamlType, dataGridBoundColumn); IGeneratorType dataGridTextColumn = new DataGridTextColumnGeneratorType(); Generators.Add(dataGridTextColumn.XamlType, dataGridTextColumn); IGeneratorType dataGridCheckBoxColumn = new DataGridCheckBoxColumnGeneratorType(); Generators.Add(dataGridCheckBoxColumn.XamlType, dataGridCheckBoxColumn); IGeneratorType dataGridTemplateColumn = new DataGridTemplateColumnGeneratorType(); Generators.Add(dataGridTemplateColumn.XamlType, dataGridTemplateColumn); IGeneratorType expander = new ExpanderGeneratorType(); Generators.Add(expander.XamlType, expander); IGeneratorType grid = new GridGeneratorType(); Generators.Add(grid.XamlType, grid); IGeneratorType header = new HeaderedContentControlGeneratorType(); Generators.Add(header.XamlType, header); IGeneratorType image = new ImageGeneratorType(); Generators.Add(image.XamlType, image); IGeneratorType listBox = new ListBoxGeneratorType(); Generators.Add(listBox.XamlType, listBox); IGeneratorType scrollViewer = new ScrollViewerGeneratorType(); Generators.Add(scrollViewer.XamlType, scrollViewer); IGeneratorType tabControl = new TabControlGeneratorType(); Generators.Add(tabControl.XamlType, tabControl); IGeneratorType textBox = new TextBoxGeneratorType(); Generators.Add(textBox.XamlType, textBox); IGeneratorType progressBar = new ProgressBarGeneratorType(); Generators.Add(progressBar.XamlType, progressBar); IGeneratorType scrollContentPresenter = new ScrollContentPresenterGeneratorType(); Generators.Add(scrollContentPresenter.XamlType, scrollContentPresenter); IGeneratorType repeatButton = new RepeatButtonGeneratorType(); Generators.Add(repeatButton.XamlType, repeatButton); IGeneratorType scrollBar = new ScrollBarGeneratorType(); Generators.Add(scrollBar.XamlType, scrollBar); IGeneratorType listBoxItem = new ListBoxItemGeneratorType(); Generators.Add(listBoxItem.XamlType, listBoxItem); IGeneratorType tabItem = new TabItemGeneratorType(); Generators.Add(tabItem.XamlType, tabItem); IGeneratorType comboBoxItem = new ComboBoxItemGeneratorType(); Generators.Add(comboBoxItem.XamlType, comboBoxItem); IGeneratorType userControl = new UserControlGeneratorType(); Generators.Add(userControl.XamlType, userControl); IGeneratorType customUserControl = new CustomUserControlGeneratorType(); Generators.Add(customUserControl.XamlType, customUserControl); IGeneratorType track = new TrackGeneratorType(); Generators.Add(track.XamlType, track); IGeneratorType thumb = new ThumbGeneratorType(); Generators.Add(thumb.XamlType, thumb); IGeneratorType slider = new SliderGeneratorType(); Generators.Add(slider.XamlType, slider); IGeneratorType numeric = new NumericTextBoxGeneratorType(); Generators.Add(numeric.XamlType, numeric); IGeneratorType pass = new PasswordBoxGeneratorType(); Generators.Add(pass.XamlType, pass); IGeneratorType customPassword = new CustomPasswordBoxGeneratorType(); Generators.Add(customPassword.XamlType, customPassword); IGeneratorType animImage = new AnimatedImageGeneratorType(); Generators.Add(animImage.XamlType, animImage); IGeneratorType shape = new ShapeGeneratorType(); Generators.Add(shape.XamlType, shape); IGeneratorType rectangle = new RectangleGeneratorType(); Generators.Add(rectangle.XamlType, rectangle); IGeneratorType ellipse = new EllipseGeneratorType(); Generators.Add(ellipse.XamlType, ellipse); IGeneratorType canvas = new CanvasGeneratorType(); Generators.Add(canvas.XamlType, canvas); IGeneratorType path = new PathGeneratorType(); Generators.Add(path.XamlType, path); IGeneratorType dockPanel = new DockPanelGeneratorType(); Generators.Add(dockPanel.XamlType, dockPanel); IGeneratorType line = new LineGeneratorType(); Generators.Add(line.XamlType, line); IGeneratorType treeView = new TreeViewGeneratorType(); Generators.Add(treeView.XamlType, treeView); IGeneratorType headerItems = new HeaderedItemsControlGeneratorType(); Generators.Add(headerItems.XamlType, headerItems); IGeneratorType treeViewItem = new TreeViewItemGeneratorType(); Generators.Add(treeViewItem.XamlType, treeViewItem); IGeneratorType wrapPanel = new WrapPanelGeneratorType(); Generators.Add(wrapPanel.XamlType, wrapPanel); IGeneratorType popup = new PopupGeneratorType(); Generators.Add(popup.XamlType, popup); IGeneratorType tabPanel = new TabPanelGeneratorType(); Generators.Add(tabPanel.XamlType, tabPanel); IGeneratorType radio = new RadioButtonGeneratorType(); Generators.Add(radio.XamlType, radio); IGeneratorType groupBox = new GroupBoxGeneratorType(); Generators.Add(groupBox.XamlType, groupBox); IGeneratorType chart = new ChartGeneratorType(); Generators.Add(chart.XamlType, chart); IGeneratorType series = new LineSeries2DGeneratorType(); Generators.Add(series.XamlType, series); IGeneratorType seriesPoint = new SeriesPointGeneratorType(); Generators.Add(seriesPoint.XamlType, seriesPoint); }