public SourceSupervisor(ISparkSource source) { _source = source; IVsHierarchy hierarchy; uint itemid; IVsTextLines buffer; _source.GetDocument(out hierarchy, out itemid, out buffer); _path = GetDocumentPath(hierarchy, itemid); //Spark.Web.Mvc.SparkView //MyBaseView var settings = new VsProjectSparkSettings(hierarchy) { PageBaseType = source.GetDefaultPageBaseType() }; var viewFolder = new VsProjectViewFolder(_source, hierarchy); _engine = new SparkViewEngine(settings) { ViewFolder = viewFolder }; _grammar = new MarkupGrammar(settings); }
public VsProjectViewFolder(ISparkSource source, IVsHierarchy hierarchy) { _source = source; _hierarchy = hierarchy; _root = new HierarchyItem(_hierarchy, 0xfffffffe); var child = _root.FirstChild; while (child != null) { if (string.Equals(child.Name, "Views", StringComparison.InvariantCultureIgnoreCase)) { _views = child; break; } child = child.NextSibling; } }
public void OnSourceAssociated(ISparkSource pSource) { var sourceSupervisor = new SourceSupervisor(pSource); pSource.SetSupervisor(sourceSupervisor); }
public Service(ISparkSource source, IElasticSink sink, IMonitor monitor) { _source = source; _sink = sink; _monitor = monitor; }