Repository navigation
Expand file tree
/
Copy pathInterfaces.cs
More file actions
87 lines (72 loc) · 2.28 KB
/
Copy pathInterfaces.cs
File metadata and controls
87 lines (72 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
* @version: 2.1.1
* @author: Ext.NET, Inc. http://www.ext.net/
* @date: 2012-12-16
* @copyright: Copyright (c) 2007-2012, Ext.NET, Inc. (http://www.ext.net/). All rights reserved.
* @license: See license.txt and http://www.ext.net/licensetransformer/.
* @website: http://www.ext.net/
*/
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace Transformer.NET
{
/* INTERFACE */
public interface IToken
{
string Value
{
get;
}
Match Match
{
get;
}
Dictionary<string, string> Attributes
{
get;
}
string Template
{
get;
}
/// <summary>
/// This method is called by parser for first token in own group (Groups collection of Parser) after all tokens are found
/// </summary>
void BeginHandle();
/// <summary>
/// This method is called by parser for first token in own group after calling BegindHandle for tokens in all groups
/// </summary>
void EndHandle();
void Validate();
}
public interface IID
{
string ID { get; }
}
public interface IIndexableToken
{
int Index { get; }
}
public interface INoneValuableToken { }
public interface ITextTransformer
{
List<Type> TokensType { get; }
List<Token> Tokens { get; }
Dictionary<string, Token> TokensById { get; }
Dictionary<string, List<Token>> Groups { get; }
Dictionary<string, List<ItemTag>> References { get; }
Dictionary<string, string> Variables { get; }
Dictionary<string, TokenSelector> Selectors { get; }
Dictionary<string, DefaultTemplateTag> DefaultTemplates { get; }
string Transform();
string Transform(List<Type> tokensType);
string Transform(Dictionary<string, string> variables);
string Transform(List<Type> tokensType, Dictionary<string, string> variables);
string ID(string prefix);
Regex TokensRegex { get; }
Regex VarsRegex { get; }
Regex AnchorsRegex { get; }
string Text { get; }
}
}