public XmlRazorDocumentSource(ModelProviders modelProviders) { if(modelProviders == null) throw new ArgumentNullException("modelProviders"); _modelProviders = modelProviders; Encoding = Encoding.UTF8; }
public XmlRazorDocumentSource(ModelProviders modelProviders) { if (modelProviders == null) { throw new ArgumentNullException("modelProviders"); } _modelProviders = modelProviders; Encoding = Encoding.UTF8; }
public MainViewModel(RazorDocumentManager documentManager, ModelProviders modelProviders, ModelBuilders modelBuilders) { _documentManager = documentManager; _modelBuilders = modelBuilders; _modelProviders = modelProviders; Templates = new ObservableCollection <RazorTemplateViewModel>(); RegisterCommands(); }
public RazorTemplateViewModel(RazorDocument document = null, ModelBuilders modelBuilderFactory = null, ModelProviders modelProviders = null) { _document = document ?? new RazorDocument(); _modelBuilderFactory = modelBuilderFactory; _modelProviderFactory = modelProviders; _savedModels = new Dictionary<Type, string>(); var modelProviderNames = _modelProviderFactory.Providers.Select(x => (string)new ModelProviderFactoryName(x.Value)); AvailableModelProviders = new ObservableCollection<string>(modelProviderNames); _selectedModelProvider = new ModelProviderName(_document.ModelProvider); Errors = new ObservableCollection<RazorPadError>(); Messages = new ObservableTextWriter(); TemplateCompiler = new TemplateCompiler(); AttachToModelProviderEvents(_document.ModelProvider); }
public RazorTemplateViewModel(RazorDocument document = null, ModelBuilders modelBuilderFactory = null, ModelProviders modelProviders = null) { _document = document ?? new RazorDocument(); _modelBuilderFactory = modelBuilderFactory; _modelProviderFactory = modelProviders; _savedModels = new Dictionary <Type, string>(); var modelProviderNames = _modelProviderFactory.Providers.Select(x => (string)new ModelProviderFactoryName(x.Value)); AvailableModelProviders = new ObservableCollection <string>(modelProviderNames); _selectedModelProvider = new ModelProviderName(_document.ModelProvider); Errors = new ObservableCollection <RazorPadError>(); Messages = new ObservableTextWriter(); TemplateCompiler = new TemplateCompiler(); AttachToModelProviderEvents(_document.ModelProvider); }
public MainViewModel(RazorDocumentManager documentManager, ModelProviders modelProviders, ModelBuilders modelBuilders) { _documentManager = documentManager; _modelBuilders = modelBuilders; _modelProviders = modelProviders; Templates = new ObservableCollection<RazorTemplateViewModel>(); RegisterCommands(); }