12 instantiations of VariableStyle
Microsoft.CodeAnalysis.Features (12)
ExtractMethod\VariableStyle.cs (12)
12
new
(ParameterStyle.None, ReturnStyle.None);
15
new
(ParameterStyle.InputOnly, ReturnStyle.None);
18
new
(ParameterStyle.MoveOut, ReturnStyle.None);
21
new
(ParameterStyle.SplitOut, ReturnStyle.None);
24
new
(ParameterStyle.MoveIn, ReturnStyle.None);
27
new
(ParameterStyle.SplitIn, ReturnStyle.None);
30
new
(ParameterStyle.MoveOut, ReturnStyle.Initialization);
33
new
(ParameterStyle.Ref, ReturnStyle.AssignmentWithInput);
36
new
(ParameterStyle.Ref, ReturnStyle.None);
39
new
(ParameterStyle.Out, ReturnStyle.AssignmentWithNoInput);
42
new
(ParameterStyle.Out, ReturnStyle.AssignmentWithInput);
45
new
(ParameterStyle.OutWithMoveOut, ReturnStyle.Initialization);
106 references to VariableStyle
Microsoft.CodeAnalysis.Features (106)
ExtractMethod\ExtractMethodMatrix.cs (76)
15
private static readonly Dictionary<Key,
VariableStyle
> s_matrix;
34
out
VariableStyle
variableStyle)
40
variableStyle =
VariableStyle
.Out;
92
variableStyle =
VariableStyle
.InputOnly;
107
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: false, writtenInside: true, readOutside: false, writtenOutside: false),
VariableStyle
.InputOnly);
108
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: false, writtenInside: true, readOutside: false, writtenOutside: true),
VariableStyle
.InputOnly);
109
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: false, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.InputOnly);
110
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: false, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.InputOnly);
111
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: true, readOutside: false, writtenOutside: false),
VariableStyle
.MoveIn);
112
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: true, readOutside: false, writtenOutside: true),
VariableStyle
.InputOnly);
113
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.SplitIn);
114
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.InputOnly);
115
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: true, readInside: false, writtenInside: false, readOutside: false, writtenOutside: true),
VariableStyle
.MoveOut);
116
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: true, readInside: false, writtenInside: false, readOutside: true, writtenOutside: true),
VariableStyle
.MoveOut);
117
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: true, readInside: false, writtenInside: true, readOutside: false, writtenOutside: false),
VariableStyle
.None);
118
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: true, readInside: false, writtenInside: true, readOutside: false, writtenOutside: true),
VariableStyle
.SplitOut);
119
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: true, readInside: false, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.SplitOut);
120
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: true, readInside: true, writtenInside: false, readOutside: false, writtenOutside: false),
VariableStyle
.None);
121
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: true, readInside: true, writtenInside: false, readOutside: false, writtenOutside: true),
VariableStyle
.SplitOut);
122
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: true, readInside: true, writtenInside: false, readOutside: true, writtenOutside: true),
VariableStyle
.SplitOut);
123
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: true, readInside: true, writtenInside: true, readOutside: false, writtenOutside: false),
VariableStyle
.None);
124
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: true, readInside: true, writtenInside: true, readOutside: false, writtenOutside: true),
VariableStyle
.SplitOut);
125
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: false, variableDeclared: true, readInside: true, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.SplitOut);
126
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: false, writtenInside: true, readOutside: false, writtenOutside: false),
VariableStyle
.MoveIn);
127
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: false, writtenInside: true, readOutside: false, writtenOutside: true),
VariableStyle
.SplitIn);
128
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: false, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.SplitIn);
129
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: false, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.SplitIn);
130
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: false, readOutside: false, writtenOutside: true),
VariableStyle
.InputOnly);
131
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: false, readOutside: true, writtenOutside: true),
VariableStyle
.Ref);
132
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: true, readOutside: false, writtenOutside: false),
VariableStyle
.MoveIn);
133
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: true, readOutside: false, writtenOutside: true),
VariableStyle
.SplitIn);
134
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.SplitIn);
135
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.SplitIn);
136
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: true, readInside: false, writtenInside: true, readOutside: false, writtenOutside: false),
VariableStyle
.None);
137
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: true, readInside: false, writtenInside: true, readOutside: false, writtenOutside: true),
VariableStyle
.SplitOut);
138
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: true, readInside: false, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.SplitOut);
139
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: true, readInside: true, writtenInside: true, readOutside: false, writtenOutside: false),
VariableStyle
.None);
140
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: true, readInside: true, writtenInside: true, readOutside: false, writtenOutside: true),
VariableStyle
.SplitOut);
141
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: false, alwaysAssigned: true, variableDeclared: true, readInside: true, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.SplitOut);
142
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: false, variableDeclared: false, readInside: false, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.Ref);
143
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: false, variableDeclared: false, readInside: false, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.Ref);
144
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.Ref);
145
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.Ref);
146
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: false, variableDeclared: true, readInside: false, writtenInside: false, readOutside: true, writtenOutside: false),
VariableStyle
.NotUsed);
147
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: false, variableDeclared: true, readInside: false, writtenInside: false, readOutside: true, writtenOutside: true),
VariableStyle
.NotUsed);
148
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: false, variableDeclared: true, readInside: false, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.OutWithMoveOut);
149
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: false, variableDeclared: true, readInside: false, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.OutWithMoveOut);
150
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: false, variableDeclared: true, readInside: true, writtenInside: false, readOutside: true, writtenOutside: false),
VariableStyle
.OutWithMoveOut);
151
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: false, variableDeclared: true, readInside: true, writtenInside: false, readOutside: true, writtenOutside: true),
VariableStyle
.OutWithMoveOut);
152
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: false, variableDeclared: true, readInside: true, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.OutWithMoveOut);
153
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: false, variableDeclared: true, readInside: true, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.OutWithMoveOut);
154
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: true, variableDeclared: false, readInside: false, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.Out);
155
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: true, variableDeclared: false, readInside: false, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.Out);
156
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.Out);
157
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.Out);
158
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: true, variableDeclared: true, readInside: false, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.OutWithMoveOut);
159
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: true, variableDeclared: true, readInside: false, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.OutWithMoveOut);
160
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: true, variableDeclared: true, readInside: true, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.OutWithMoveOut);
161
s_matrix.Add(new Key(dataFlowIn: false, dataFlowOut: true, alwaysAssigned: true, variableDeclared: true, readInside: true, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.OutWithMoveOut);
162
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: false, readOutside: false, writtenOutside: false),
VariableStyle
.InputOnly);
163
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: false, readOutside: false, writtenOutside: true),
VariableStyle
.InputOnly);
164
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: false, readOutside: true, writtenOutside: false),
VariableStyle
.InputOnly);
165
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: false, readOutside: true, writtenOutside: true),
VariableStyle
.InputOnly);
166
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: true, readOutside: false, writtenOutside: false),
VariableStyle
.InputOnly);
167
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: true, readOutside: false, writtenOutside: true),
VariableStyle
.InputOnly);
168
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.InputOnly);
169
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: false, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.InputOnly);
170
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: true, readOutside: false, writtenOutside: false),
VariableStyle
.InputOnly);
171
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: true, readOutside: false, writtenOutside: true),
VariableStyle
.InputOnly);
172
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.InputOnly);
173
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: false, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.InputOnly);
174
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: true, alwaysAssigned: false, variableDeclared: false, readInside: false, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.Ref);
175
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: true, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.OutWithErrorInput);
176
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: true, alwaysAssigned: false, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.Ref);
177
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: true, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: false),
VariableStyle
.OutWithErrorInput);
178
s_matrix.Add(new Key(dataFlowIn: true, dataFlowOut: true, alwaysAssigned: true, variableDeclared: false, readInside: true, writtenInside: true, readOutside: true, writtenOutside: true),
VariableStyle
.Ref);
ExtractMethod\MethodExtractor.Analyzer.cs (16)
393
/// variable we don't understand has <see cref="
VariableStyle
.None"/></param>
491
out
var
variableStyle))
559
VariableStyle
style)
592
out
VariableStyle
variableStyle)
611
if (captured && variableStyle ==
VariableStyle
.MoveIn)
613
variableStyle =
VariableStyle
.Out;
662
protected static
VariableStyle
AlwaysReturn(
VariableStyle
style)
664
if (style ==
VariableStyle
.InputOnly)
666
return
VariableStyle
.Ref;
669
if (style ==
VariableStyle
.MoveIn)
671
return
VariableStyle
.Out;
674
if (style ==
VariableStyle
.SplitIn)
676
return
VariableStyle
.Out;
679
if (style ==
VariableStyle
.SplitOut)
681
return
VariableStyle
.OutWithMoveOut;
ExtractMethod\MethodExtractor.VariableInfo.cs (2)
25
VariableStyle
variableStyle,
29
private readonly
VariableStyle
_variableStyle = variableStyle;
ExtractMethod\VariableStyle.cs (12)
11
public static readonly
VariableStyle
None =
14
public static readonly
VariableStyle
InputOnly =
17
public static readonly
VariableStyle
MoveOut =
20
public static readonly
VariableStyle
SplitOut =
23
public static readonly
VariableStyle
MoveIn =
26
public static readonly
VariableStyle
SplitIn =
29
public static readonly
VariableStyle
NotUsed =
32
public static readonly
VariableStyle
Ref =
35
public static readonly
VariableStyle
OnlyAsRefParam =
38
public static readonly
VariableStyle
Out =
41
public static readonly
VariableStyle
OutWithErrorInput =
44
public static readonly
VariableStyle
OutWithMoveOut =