Code Coverage Statistics for Source File
c:\Tools\SD3\src\Libraries\ICSharpCode.TextEditor\Project\Src\Document\HighlightingStrategy\HighlightingStrategyFactory.cs
|
Sequence Point Coverage
N/A
0 of 0
|
Branch Coverage
N/A
0 of 0
|
Lines
38
|
Highlight:
Uncovered Code
Covered Code
| L | V | Source |
|---|---|---|
1 |
// <file> |
|
2 |
// <copyright see="prj:///doc/copyright.txt"/> |
|
3 |
// <license see="prj:///doc/license.txt"/> |
|
4 |
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/> |
|
5 |
// <version>$Revision: 1965 $</version> |
|
6 |
// </file> |
|
7 |
||
8 |
using System; |
|
9 |
||
10 |
namespace ICSharpCode.TextEditor.Document |
|
11 |
{ |
|
12 |
public class HighlightingStrategyFactory |
|
13 |
{ |
|
14 |
public static IHighlightingStrategy CreateHighlightingStrategy() |
|
15 |
{ |
|
16 |
return (IHighlightingStrategy)HighlightingManager.Manager.HighlightingDefinitions["Default"]; |
|
17 |
} |
|
18 |
||
19 |
public static IHighlightingStrategy CreateHighlightingStrategy(string name) |
|
20 |
{ |
|
21 |
IHighlightingStrategy highlightingStrategy = HighlightingManager.Manager.FindHighlighter(name); |
|
22 |
||
23 |
if (highlightingStrategy == null) { |
|
24 |
return CreateHighlightingStrategy(); |
|
25 |
} |
|
26 |
return highlightingStrategy; |
|
27 |
} |
|
28 |
||
29 |
public static IHighlightingStrategy CreateHighlightingStrategyForFile(string fileName) |
|
30 |
{ |
|
31 |
IHighlightingStrategy highlightingStrategy = HighlightingManager.Manager.FindHighlighterForFile(fileName); |
|
32 |
if (highlightingStrategy == null) { |
|
33 |
return CreateHighlightingStrategy(); |
|
34 |
} |
|
35 |
return highlightingStrategy; |
|
36 |
} |
|
37 |
} |
|
38 |
} |