예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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;
            }
        }
예제 #4
0
        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;
            }
        }
예제 #5
0
 public void OnSourceAssociated(ISparkSource pSource)
 {
     var sourceSupervisor = new SourceSupervisor(pSource);
     pSource.SetSupervisor(sourceSupervisor);
 }
예제 #6
0
        public void OnSourceAssociated(ISparkSource pSource)
        {
            var sourceSupervisor = new SourceSupervisor(pSource);

            pSource.SetSupervisor(sourceSupervisor);
        }
예제 #7
0
 public Service(ISparkSource source, IElasticSink sink, IMonitor monitor)
 {
     _source = source;
     _sink = sink;
     _monitor = monitor;
 }