Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikayla Hutchinson <m.j.hutchinson@gmail.com>2018-06-08 00:43:58 +0300
committerMikayla Hutchinson <m.j.hutchinson@gmail.com>2018-06-08 01:30:53 +0300
commit8ef4d580a75225b1e01b00526cda556ab8d351be (patch)
tree1a15ba68c8f3189cd257f5358c29191ad62853f2 /main/src/addins/TextTemplating
parent73a8ba45e7d265da7fbb423d3d71f64b8f693eee (diff)
[T4] Fix warning
Diffstat (limited to 'main/src/addins/TextTemplating')
-rw-r--r--main/src/addins/TextTemplating/MonoDevelop.TextTemplating/Parser/T4ParsedDocument.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/main/src/addins/TextTemplating/MonoDevelop.TextTemplating/Parser/T4ParsedDocument.cs b/main/src/addins/TextTemplating/MonoDevelop.TextTemplating/Parser/T4ParsedDocument.cs
index 1d6036c153..63d5f95b58 100644
--- a/main/src/addins/TextTemplating/MonoDevelop.TextTemplating/Parser/T4ParsedDocument.cs
+++ b/main/src/addins/TextTemplating/MonoDevelop.TextTemplating/Parser/T4ParsedDocument.cs
@@ -80,15 +80,12 @@ namespace MonoDevelop.TextTemplating.Parser
public IEnumerable<FoldingRegion> Foldings {
get {
- foreach (var region in GetCommentsAsync().Result.ToFolds ())
- yield return region;
foreach (ISegment seg in TemplateSegments) {
if (seg.EndLocation.Line - seg.TagStartLocation.Line < 1)
continue;
string name;
- TemplateSegment ts = seg as TemplateSegment;
- if (ts != null) {
+ if (seg is TemplateSegment ts) {
if (ts.Type == SegmentType.Content) {
continue;
} else if (ts.Type == SegmentType.Expression) {
@@ -99,10 +96,10 @@ namespace MonoDevelop.TextTemplating.Parser
name = "<#...#>";
}
} else {
- Directive dir = (Directive)seg;
+ var dir = (Directive)seg;
name = "<#@" + dir.Name + "...#>";
}
-
+
var region = new DocumentRegion (seg.TagStartLocation.Line, seg.TagStartLocation.Column,
seg.EndLocation.Line, seg.EndLocation.Column);