public IActionResult DeleteConfirm(int id) { var _repo = new SourceManager(); _repo.Remove(id); return(RedirectToAction("Index")); }
private void Recycle(SourceManager src) { src.source.gameObject.SetActive(false); src.source.transform.parent = holder; active.Remove(src); pool.Enqueue(src.source); }
public ActionResult Index() { SourceManager sourceManager = new SourceManager(); var show = sourceManager.GetAll(); return(View(show)); }
public ActionResult Search(string TextBox) { SourceManager sourceManager = new SourceManager(); var result = sourceManager.Search(TextBox); return(View(result)); }
protected override void PluginInitialize() { Console.WriteLine("Initializing Sample Plugin"); timeout_id = GLib.Timeout.Add(5000, OnTimeout); source = new SampleSource(); SourceManager.AddSource(source); }
// optional, this is a virtual override, only // only provide an implementation if there are // resources to dispose of or other objects that // need notification, etc. protected override void PluginDispose() { Console.WriteLine("Disposing Sample Plugin"); GLib.Source.Remove(timeout_id); timeout_id = 0; SourceManager.RemoveSource(source); }
public async Task UpdateImageSourceAsync() { if (NativeView != null) { var token = this.SourceManager.BeginLoad(); var imageSource = _imageSourcePart(); if (imageSource != null) { #if __IOS__ || __ANDROID__ || WINDOWS var result = await imageSource.UpdateSourceAsync(NativeView, ImageSourceServiceProvider, SetImage !, token) .ConfigureAwait(false); SourceManager.CompleteLoad(result); #else await Task.CompletedTask; #endif } else { SetImage?.Invoke(null); SourceManager.CompleteLoad(null); } } }
/*============Public Function=======*/ public void Update() { SetUpdateProgress(0, 0, UpdateState.Checking); Source.Source s = SourceManager.GetSource(_novelTitle, 22590, SourceManager.Sources.web69); Tuple <string, string>[] menuItems = s.GetMenuURLs(); int newlyAddedChapter = 0; for (int i = _chapters.Count; i < menuItems.Length; i++) { string chapterTitle = menuItems[i].Item1; string url = menuItems[i].Item2; Chapter newChapter = new Chapter(chapterTitle, _novelTitle, false, i); AppendNewChapter(newChapter); newlyAddedChapter++; SetUpdateProgress(i, menuItems.Length, UpdateState.Fetching); string[] novelContent = s.GetChapterContent(chapterTitle, url); string chapterLocation = newChapter.GetTextFileLocation(); System.IO.File.WriteAllLines(chapterLocation, novelContent); } SetUpdateProgress(0, 0, UpdateState.UpToDate); if (BackgroundService.Instance.novelListController.InvokeRequired) { BackgroundService.Instance.novelListController.BeginInvoke(new System.Windows.Forms.MethodInvoker(delegate { NewChapterCount = _newChapterCount + newlyAddedChapter; NotifyPropertyChanged("ChapterCount"); })); } }
/// <summary> /// Scans the external portion, i.e. the system identifier of the doctype. /// </summary> /// <param name="url">The url to use.</param> /// <param name="typeDefinitions">The type definitions to modify.</param> void ScanExternalSubset(String url, DtdContainer typeDefinitions) { if (Configuration.HasHttpRequester) { if (!Location.IsAbsolute(url)) { url = Location.MakeAbsolute(doc.BaseURI, url); } var http = Configuration.GetHttpRequester(); var response = http.Request(new DefaultHttpRequest { Address = new Uri(url) }); var stream = new SourceManager(response.Content); var container = new DtdContainer(typeDefinitions) { Url = url, Parent = doc }; var dtd = new DtdParser(container, stream); dtd.IsInternal = false; dtd.Parse(); } }
public IActionResult Index(string lastName) { // W przypadku podania pustego stringu do wyszukiwania wróć do trybu wyświetlania // wszystkich rekordów z paginacją if (string.IsNullOrEmpty(lastName)) { return(RedirectToActionPermanent("Index", new { page = 1 })); } List <PersonModel> people = new List <PersonModel>(); try { using SourceManager sourceManager = new SourceManager(); lastName = string.IsNullOrWhiteSpace(lastName) ? "%" : lastName.Replace('*', '%'); people = sourceManager.Get(1, int.MaxValue, lastName); } catch { TempData["Error"] = "Błąd bazy danych"; return(View("DataSourceErrorPage")); // wyświetl stronę błędu } // Żeby nie wyświetlać zbyt wielu kolumn, wyświetlana jest tylko data ostatniego zapisu rekordu // Jeśli brak daty aktualizacji => data aktualizacji = data utworzenia (tylko na potrzeby tego widoku) people.ForEach(p => { if (p.Updated == null) { p.Updated = p.Created; } }); return(View(people)); }
public void Init(VideoSourceModel videoSource, SourceManager delayTime) { foreach (Transform item in content.transform) { Destroy(item.gameObject); } foreach (CamPoseModel model in videoSource.points) { GameObject go = Instantiate(camPoseObject); VideoButton videoButton = go.GetComponent <VideoButton>(); go.transform.SetParent(content.transform, false); videoButton.Init(model); } content.SetActive(false); string fileName = Application.persistentDataPath + "/Documents/video_" + videoSource.id + ".mp4"; if (!File.Exists(fileName)) { return; } videoPlayer.url = fileName; this.transform.rotation = Quaternion.Euler(0, -90, 0); }
private void sourceChecker_DoWork(object sender, DoWorkEventArgs e) { source = SourceManager.GetSource(sourceLocation, sourceID); Tuple <bool, string> result = source.VerifySource(); e.Result = result; }
/// <summary> /// Creates a new tokenizer for XML documents. /// </summary> /// <param name="source">The source code manager.</param> public XmlTokenizer(SourceManager source) : base(source) { _dtd = new DtdContainer(); _dtd.AddEntity(new Entity { NodeName = "amp", NodeValue = "&" }); _dtd.AddEntity(new Entity { NodeName = "lt", NodeValue = "<" }); _dtd.AddEntity(new Entity { NodeName = "gt", NodeValue = ">" }); _dtd.AddEntity(new Entity { NodeName = "apos", NodeValue = "'" }); _dtd.AddEntity(new Entity { NodeName = "quot", NodeValue = "\"" }); }
private void Awake() { instance = this; clipManager = new ClipManager(); sourceManager = new SourceManager(gameObject); InvokeRepeating("DelFreeSource", 10, 5); }
public static void ImportClasses(this OGLContext context, bool applyKeywords = false) { if (context == null || context.Config == null) { return; } context.Classes.Clear(); context.ClassesSimple.Clear(); var files = SourceManager.EnumerateFiles(context, context.Config.Classes_Directory, SearchOption.TopDirectoryOnly); foreach (var f in files) { try { using (TextReader reader = f.Value.GetReader()) { ClassDefinition s = (ClassDefinition)ClassDefinition.Serializer.Deserialize(reader); s.Source = f.Value.Source; s.Register(context, f.Value.FullName, applyKeywords); } } catch (Exception e) { ConfigManager.LogError("Error reading " + f.ToString(), e); } } }
/// <summary> /// See 8.2.4 Tokenization /// </summary> /// <param name="source">The source code manager.</param> public HtmlTokenizer(SourceManager source) : base(source) { _model = HtmlParseMode.PCData; _acceptsCharacterData = false; _buffer = new StringBuilder(); }
public IActionResult Edit(PersonModel model) { var _repo = new SourceManager(); _repo.Update(model); return(RedirectToAction("Index")); }
public IActionResult Delete(PersonModel personModel) { SourceManager.Delete(personModel.ID); TempData["mess"] = "Deleted"; TempData["alert"] = "alert alert-danger"; return(Redirect("/Person/index")); }
/// <summary> /// Creates a new DTD tokenizer with the given source and container. /// </summary> /// <param name="container">The container to use.</param> /// <param name="src">The source to inspect.</param> public DtdPlainTokenizer(DtdContainer container, SourceManager src) : base(src) { _container = container; _external = true; _stream = new IntermediateStream(src); }
public IActionResult Remove(int id) { var source = new SourceManager(); var record = source.GetById(id); return(View(record)); }
public SourceLibraryViewModel( SourceManager sourceManager, OpenDetailsCommand openDetailsCommand, GetDetailsCommand getDetailsCommand, InfiniteScrollCommand infiniteScrollCommand, GetFinalizedCommand getFinalizedCommand, ShowLetherCommand showLetherCommand) { _sourceManager = sourceManager; _openDetailsCommand = openDetailsCommand; _getDetailsCommand = getDetailsCommand; _infiniteScrollCommand = infiniteScrollCommand; _getFinalizedCommand = getFinalizedCommand; _showLetherCommand = showLetherCommand; _hqsources = _sourceManager.GetSources(); Sources = new string[] { "MangaHost", "YesMangas", "UnionMangas", "MangasProject", "MangaLivre" }; started = false; SelectedSource = Sources[4]; NavigationEventHub.Navigated += OnNavigated; }
public IActionResult Index(string lastName) { try { if (lastName.Length < 65 && lastName != "" && lastName != null) { ViewBag.Title = "Search Result | The Phone Book"; ViewBag.SearchLastName = lastName; ViewBag.Subtitle = $"Search by the surname: {ViewBag.SearchLastName}"; var searchList = SourceManager.GetByLastName(lastName); return(View("List", searchList)); } } catch (NullReferenceException) { TempData["WrongData"] = "Wrong data. Try again."; return(View()); } catch (ArgumentNullException) { TempData["WrongData"] = "Wrong data. Try again."; return(View()); } catch (Exception) { TempData["WrongData"] = "Wrong data. Try again."; return(View()); } return(View()); }
public static void ImportItems(this OGLContext context) { if (context == null || context.Config == null) { return; } context.Items.Clear(); context.ItemLists.Clear(); context.ItemsSimple.Clear(); var files = SourceManager.EnumerateFiles(context, context.Config.Items_Directory); foreach (var f in files) { try { Uri source = new Uri(SourceManager.GetDirectory(f.Value, context.Config.Items_Directory).FullName); Uri target = new Uri(f.Key.DirectoryName); using (TextReader reader = new StreamReader(f.Key.FullName)) { Item s = (Item)Item.Serializer.Deserialize(reader); s.Category = Make(context, source.MakeRelativeUri(target)); s.Source = f.Value; s.Register(context, f.Key.FullName); } } catch (Exception e) { ConfigManager.LogError("Error reading " + f.ToString(), e); } } }
private void RemoveClutterFlow() { Clutter.Threads.Enter(); music_library.Properties.Remove("Nereid.SourceContents"); Clutter.Threads.Leave(); clutter_flow_contents.Dispose(); clutter_flow_contents = null; source_manager.ActiveSourceChanged -= HandleActiveSourceChanged; BrowserAction.Activated -= OnToggleBrowser; BrowserAction.Active = ClutterFlowSchemas.OldShowBrowser.Get(); CfBrowsAction.Activated -= OnToggleClutterFlow; CfBrowsAction.Visible = false; action_service.RemoveActionGroup("ClutterFlowView"); action_service.UIManager.RemoveUi(ui_manager_id); clutterflow_actions = null; cfbrows_action = null; preference_service = null; source_manager = null; music_library = null; action_service = null; browser_action = null; cfbrows_action = null; }
public IActionResult Edit(int id) { var _repo = new SourceManager(); var model = _repo.GetByID(id); return(View(model)); }
public static void ImportConditions(this OGLContext context) { if (context == null || context.Config == null) { return; } context.Conditions.Clear(); context.ConditionsSimple.Clear(); var files = SourceManager.EnumerateFiles(context, context.Config.Conditions_Directory, SearchOption.TopDirectoryOnly); foreach (var f in files) { try { using (TextReader reader = new StreamReader(f.Key.FullName)) { Condition s = (Condition)Condition.Serializer.Deserialize(reader); s.Source = f.Value; s.Register(context, f.Key.FullName); } } catch (Exception e) { ConfigManager.LogError("Error reading " + f.ToString(), e); } } }
public IActionResult Delete(int id) { var _repo = new SourceManager(); PersonModel model = _repo.GetByID(id); return(View(model)); }
public void NewspaperDtdComplete() { var s = new SourceManager(@"<!DOCTYPE NEWSPAPER [ <!ELEMENT NEWSPAPER (ARTICLE+)> <!ELEMENT ARTICLE (HEADLINE,BYLINE,LEAD,BODY,NOTES)> <!ELEMENT HEADLINE (#PCDATA)> <!ELEMENT BYLINE (#PCDATA)> <!ELEMENT LEAD (#PCDATA)> <!ELEMENT BODY (#PCDATA)> <!ELEMENT NOTES (#PCDATA)> <!ATTLIST ARTICLE AUTHOR CDATA #REQUIRED> <!ATTLIST ARTICLE EDITOR CDATA #IMPLIED> <!ATTLIST ARTICLE DATE CDATA #IMPLIED> <!ATTLIST ARTICLE EDITION CDATA #IMPLIED> <!ENTITY NEWSPAPER ""Vervet Logic Times""> <!ENTITY PUBLISHER ""Vervet Logic Press""> <!ENTITY COPYRIGHT 'Copyright 1998 Vervet Logic Press'> ]>"); var t = new XmlTokenizer(s); t.DTD.Reset(); var e = t.Get(); Assert.AreEqual(XmlTokenType.DOCTYPE, e.Type); var d = (XmlDoctypeToken)e; Assert.IsFalse(d.IsNameMissing); Assert.AreEqual("NEWSPAPER", d.Name); Assert.IsTrue(d.IsSystemIdentifierMissing); Assert.AreEqual(14, t.DTD.Count); }
public IActionResult Index(int id = 1, string name = "") { int count = SourceManager.GetCount(name); int prev = id - 1; int next = id + 1; if (id <= 1) { prev = 1; } if (count <= id * 5) { next = id; } ViewBag.Title = "Home"; ViewBag.Name = name; ViewBag.Prev = prev; ViewBag.Next = next; ViewBag.ID = id; return(View(SourceManager.Get(id, 5, name))); }
/// <summary> /// Creates a new tokenizer for XML documents. /// </summary> /// <param name="source">The source code manager.</param> public XmlTokenizer(SourceManager source) : base(source) { _dtd = new DtdContainer(); _dtd.AddEntity(new DOM.Entity { NotationName = "amp", NodeValue = "&" }); _dtd.AddEntity(new DOM.Entity { NotationName = "lt", NodeValue = "<" }); _dtd.AddEntity(new DOM.Entity { NotationName = "gt", NodeValue = ">" }); _dtd.AddEntity(new DOM.Entity { NotationName = "apos", NodeValue = "'" }); _dtd.AddEntity(new DOM.Entity { NotationName = "quot", NodeValue = "\"" }); }
public IActionResult RemoveConfirm(int id) { SourceManager.Remove(id); ViewBag.Title = "Delete an entry | The Phone Book"; TempData["deleted"] = "Successfully deleted!"; return(View()); }
public static void ImportBackgrounds(this OGLContext context) { if (context == null || context.Config == null) { return; } context.Backgrounds.Clear(); context.BackgroundsSimple.Clear(); var files = SourceManager.EnumerateFiles(context, context.Config.Backgrounds_Directory, SearchOption.TopDirectoryOnly); foreach (var f in files) { try { using (TextReader reader = f.Value.GetReader()) { Background s = (Background)Background.Serializer.Deserialize(reader); s.Source = f.Value.Source; foreach (Feature fea in s.Features) { fea.Source = f.Value.Source; } s.Register(context, f.Value.FullName); } } catch (Exception e) { ConfigManager.LogError("Error reading " + f.ToString(), e); } } }
public void Dispose() { var sm = new SourceManager (); sm.Initialize (); sm.AddSource (new ErrorSource ("Baz")); Assert.IsFalse (sm.Sources.Count == 0); sm.Dispose (); Assert.IsTrue (sm.Sources.Count == 0); }
/// <summary> /// See 8.2.4 Tokenization /// </summary> /// <param name="source">The source code manager.</param> public HtmlTokenizer(SourceManager source) { src = source; model = HtmlParseMode.PCData; buffered = false; allowCdata = true; reference = new StringBuilder(); stringBuffer = new StringBuilder(); tokenBuffer = new Queue<HtmlToken>(); }
void IExtensionService.Initialize () { elements_service = ServiceManager.Get<GtkElementsService> (); interface_action_service = ServiceManager.Get<InterfaceActionService> (); source_manager = ServiceManager.SourceManager; player = ServiceManager.PlayerEngine; if (!ServiceStartup ()) { ServiceManager.ServiceStarted += OnServiceStarted; } }
/// <summary> /// Creates a new Dtd parser that uses the given container /// as the result for parsing the given source. /// </summary> /// <param name="container">The container to use.</param> /// <param name="source">The source to parse.</param> public DtdParser(DtdContainer container, SourceManager source) { _tokenizer = new DtdTokenizer(container, source); _result = container; _src = source; _tokenizer.ErrorOccurred += (s, ev) => { if (ErrorOccurred != null) ErrorOccurred(this, ev); }; }
private void OnServiceStarted (ServiceStartedArgs args) { if (args.Service is Banshee.Gui.InterfaceActionService) { interface_action_service = (InterfaceActionService)args.Service; } else if (args.Service is GtkElementsService) { elements_service = (GtkElementsService)args.Service; } else if (args.Service is SourceManager) { source_manager = ServiceManager.SourceManager; } else if (args.Service is PlayerEngineService) { player = ServiceManager.PlayerEngine; } ServiceStartup (); }
/// <summary> /// Creates a new CSS parser instance parser with the specified stylesheet /// based on the given source manager. /// </summary> /// <param name="stylesheet">The stylesheet to be constructed.</param> /// <param name="source">The source to use.</param> internal CssParser(CSSStyleSheet stylesheet, SourceManager source) { ignore = true; buffer = new StringBuilder(); tokenizer = new CssTokenizer(source); tokenizer.ErrorOccurred += (s, ev) => { if (ErrorOccurred != null) ErrorOccurred(this, ev); }; started = false; sheet = stylesheet; open = new Stack<CSSRule>(); }
/// <summary> /// Creates a new instance of the XML parser with the specified document /// based on the given source manager. /// </summary> /// <param name="document">The document instance to be constructed.</param> /// <param name="source">The source to use.</param> internal XmlParser(XMLDocument document, SourceManager source) { tokenizer = new XmlTokenizer(source); tokenizer.ErrorOccurred += (s, ev) => { if (ErrorOccurred != null) ErrorOccurred(this, ev); }; started = false; doc = document; standalone = false; open = new List<Element>(); insert = XmlTreeMode.Initial; }
public void AddRemove() { var sm = new SourceManager (); var src = new ErrorSource ("Foo"); sm.AddSource (src, false); Assert.AreEqual (sm.Sources.Count, 1); var src2 = new ErrorSource ("Bar"); sm.AddSource (src2, true); Assert.IsTrue (sm.Sources.Count == 2); Assert.AreEqual (src2, sm.DefaultSource); Assert.AreEqual (src2, sm.ActiveSource); sm.SetActiveSource (src); Assert.AreEqual (src, sm.ActiveSource); sm.RemoveSource (src); Assert.IsTrue (sm.Sources.Count == 1); }
/// <summary> /// Creates a new DTD tokenizer with the given source and container. /// </summary> /// <param name="container">The container to use.</param> /// <param name="src">The source to inspect.</param> public DtdTokenizer(DtdContainer container, SourceManager src) : base(container, src) { _includes = 0; IsExternal = true; }
private void RemoveClutterFlow() { Clutter.Threads.Enter (); music_library.Properties.Remove ("Nereid.SourceContents"); Clutter.Threads.Leave (); clutter_flow_contents.Dispose (); clutter_flow_contents = null; source_manager.ActiveSourceChanged -= HandleActiveSourceChanged; BrowserAction.Activated -= OnToggleBrowser; BrowserAction.Active = ClutterFlowSchemas.OldShowBrowser.Get (); CfBrowsAction.Activated -= OnToggleClutterFlow; CfBrowsAction.Visible = false; action_service.RemoveActionGroup ("ClutterFlowView"); action_service.UIManager.RemoveUi (ui_manager_id); clutterflow_actions = null; cfbrows_action = null; preference_service = null; source_manager = null; music_library = null; action_service = null; browser_action = null; cfbrows_action = null; }
void IExtensionService.Initialize() { ClutterHelper.Init (); preference_service = ServiceManager.Get<PreferenceService> (); action_service = ServiceManager.Get<InterfaceActionService> (); source_manager = ServiceManager.SourceManager; music_library = source_manager.MusicLibrary; if (!SetupPreferences () || !SetupInterfaceActions ()) { ServiceManager.ServiceStarted += OnServiceStarted; } else if (!SetupSourceContents ()) { source_manager.SourceAdded += OnSourceAdded; } //--> TODO Banshee.ServiceStack.Application. register Exit event to close threads etc. }
public DtdTokenizer(SourceManager src) : base(src) { End = Specification.EOF; }
/// <summary> /// Scans the external portion, i.e. the system identifier of the doctype. /// </summary> /// <param name="url">The url to use.</param> /// <param name="typeDefinitions">The type definitions to modify.</param> void ScanExternalSubset(String url, DtdContainer typeDefinitions) { if (Configuration.HasHttpRequester) { if (!Location.IsAbsolute(url)) url = Location.MakeAbsolute(doc.BaseURI, url); var http = Configuration.GetHttpRequester(); var response = http.Request(new DefaultHttpRequest { Address = new Uri(url) }); var stream = new SourceManager(response.Content); var container = new DtdContainer(typeDefinitions) { Url = url, Parent = doc }; var dtd = new DtdParser(container, stream); dtd.IsInternal = false; dtd.Parse(); } }
public CssTokenizer(SourceManager source) { stringBuffer = new StringBuilder(); src = source; }
public HTMLDocument Load(String url) { location = url; Cookie = new Cookie(); for (int i = _children.Length - 1; i >= 0; i++) RemoveChild(_children[i]); ReadyState = Readiness.Loading; QuirksMode = QuirksMode.Off; var stream = Builder.Stream(url); var source = new SourceManager(stream); var parser = new HtmlParser(this, source); return parser.Result; }
public IntermediateStream(SourceManager src) { _start = src.InsertionPoint - 1; _pos = new Stack<Int32>(); _params = new Stack<String>(); _texts = new Stack<String>(); _base = src; }
public XmlBaseTokenizer(SourceManager src) : base(src) { }
/// <summary> /// Creates a new tokenizer for XML documents. /// </summary> /// <param name="source">The source code manager.</param> public XmlTokenizer(SourceManager source) { src = source; stringBuffer = new StringBuilder(); }
/// <summary> /// Sets the document's encoding to the given one. /// </summary> /// <param name="source">The source to change.</param> /// <param name="encoding">The encoding to use.</param> static void SetEncoding(SourceManager source, String encoding) { //TODO return; if (DocumentEncoding.IsSupported(encoding)) { var enc = DocumentEncoding.Resolve(encoding); if (enc != null) source.Encoding = enc; } }
internal SourceManager(SourceManager.Internal native) : this(&native) { }
internal SourceManager(SourceManager.Internal* native) : this(new global::System.IntPtr(native)) { }
public HTMLDocument Load(String url) { _location.Href = url; Cookie = new Cookie(); for (int i = _children.Length - 1; i >= 0; i++) RemoveChild(_children[i]); ReadyState = Readiness.Loading; QuirksMode = QuirksMode.Off; var task = Builder.GetFromUrl(url); task.ContinueWith(m => { if (m.IsCompleted && !m.IsFaulted) { var stream = m.Result; var source = new SourceManager(stream); var parser = new HtmlParser(this, source); parser.Parse(); } }); return this; }
public CssTokenizer(SourceManager source) : base(source) { _stringBuffer = new StringBuilder(); _src = source; }
/// <summary> /// Creates a new instance of the HTML parser with the specified document /// based on the given source manager. /// </summary> /// <param name="document">The document instance to be constructed.</param> /// <param name="source">The source to use.</param> internal HtmlParser(HTMLDocument document, SourceManager source) { tokenizer = new HtmlTokenizer(source); tokenizer.ErrorOccurred += (s, ev) => { if (ErrorOccurred != null) ErrorOccurred(this, ev); }; started = false; doc = document; open = new List<Element>(); formatting = new List<Element>(); frameset = true; insert = HtmlTreeMode.Initial; }
/// <summary> /// Gets the text included in the external source. /// </summary> /// <param name="url">The URL of the external source.</param> /// <returns>The contained string.</returns> String GetText(String url) { if (Configuration.HasHttpRequester) { if (!Location.IsAbsolute(url)) url = Location.MakeAbsolute(_result.Url, url); var http = Configuration.GetHttpRequester(); var response = http.Request(new DefaultHttpRequest { Address = new Uri(url) }); var stream = new SourceManager(response.Content); var tok = new DtdPlainTokenizer(_result, stream); var token = tok.Get(); if (token.Type == DtdTokenType.TextDecl) { var pi = (DtdDeclToken)token; if (!String.IsNullOrEmpty(pi.Encoding)) SetEncoding(stream, pi.Encoding); token = tok.Get(); } if (token.Type == DtdTokenType.Comment) return ((DtdCommentToken)token).Data; } return String.Empty; }