45 references to ToReadOnly
System.Linq.Expressions (45)
System\Dynamic\CallInfo.cs (1)
53
var argNameCol = argNames.
ToReadOnly
();
System\Dynamic\Utils\ExpressionUtils.cs (2)
46
Interlocked.CompareExchange(ref collection, value.
ToReadOnly
(), value);
281
replacement = replacementCol = replacement.
ToReadOnly
();
System\Linq\Expressions\BlockExpression.cs (7)
83
variables = vars = variables.
ToReadOnly
();
94
expressions = exps = expressions.
ToReadOnly
();
974
ReadOnlyCollection<ParameterExpression> variableList = variables.
ToReadOnly
();
978
IReadOnlyList<Expression> expressionList = expressions as IReadOnlyList<Expression> ?? expressions.
ToReadOnly
();
985
ReadOnlyCollection<Expression> expressionList = expressions.
ToReadOnly
();
1004
ReadOnlyCollection<Expression> expressionList = expressions.
ToReadOnly
();
1007
ReadOnlyCollection<ParameterExpression> variableList = variables.
ToReadOnly
();
System\Linq\Expressions\Compiler\CompilerScope.cs (1)
296
ReadOnlyCollection<ParameterExpression> hoistedVars = GetVariables().Where(p => Definitions[p] == VariableStorageKind.Hoisted).
ToReadOnly
();
System\Linq\Expressions\DynamicExpression.cs (4)
191
arguments = args = arguments.
ToReadOnly
();
853
IReadOnlyList<Expression> argumentList = arguments as IReadOnlyList<Expression> ?? arguments.
ToReadOnly
();
872
var args = arguments.
ToReadOnly
(); // Ensure is TrueReadOnlyCollection when count > 4. Returns fast if it already is.
1234
var args = arguments.
ToReadOnly
();
System\Linq\Expressions\ElementInit.cs (1)
94
ReadOnlyCollection<Expression> argumentsRO = arguments.
ToReadOnly
();
System\Linq\Expressions\IndexExpression.cs (3)
183
ReadOnlyCollection<Expression> indexList = indexes.
ToReadOnly
();
218
return MakeIndexProperty(instance, pi, nameof(propertyName), arguments.
ToReadOnly
());
361
MakeIndexProperty(instance, indexer, nameof(indexer), arguments.
ToReadOnly
());
System\Linq\Expressions\InvocationExpression.cs (2)
713
IReadOnlyList<Expression> argumentList = arguments as IReadOnlyList<Expression> ?? arguments.
ToReadOnly
();
733
ReadOnlyCollection<Expression> args = argumentList.
ToReadOnly
(); // Ensure is TrueReadOnlyCollection when count > 5. Returns fast if it already is.
System\Linq\Expressions\LambdaExpression.cs (5)
269
parameters = pars = parameters.
ToReadOnly
();
718
ReadOnlyCollection<ParameterExpression> parameterList = parameters.
ToReadOnly
();
856
ReadOnlyCollection<ParameterExpression> parameterList = parameters.
ToReadOnly
();
891
ReadOnlyCollection<ParameterExpression> paramList = parameters.
ToReadOnly
();
908
ReadOnlyCollection<ParameterExpression> paramList = parameters.
ToReadOnly
();
System\Linq\Expressions\ListInitExpression.cs (3)
127
ReadOnlyCollection<Expression> initializerlist = initializers.
ToReadOnly
();
169
ReadOnlyCollection<Expression> initializerlist = initializers.
ToReadOnly
();
210
ReadOnlyCollection<ElementInit> initializerlist = initializers.
ToReadOnly
();
System\Linq\Expressions\MemberInitExpression.cs (1)
161
ReadOnlyCollection<MemberBinding> roBindings = bindings.
ToReadOnly
();
System\Linq\Expressions\MemberListBinding.cs (1)
86
ReadOnlyCollection<ElementInit> initList = initializers.
ToReadOnly
();
System\Linq\Expressions\MemberMemberBinding.cs (1)
83
ReadOnlyCollection<MemberBinding> roBindings = bindings.
ToReadOnly
();
System\Linq\Expressions\MethodCallExpression.cs (4)
78
arguments = args = arguments.
ToReadOnly
();
1191
IReadOnlyList<Expression> argumentList = arguments as IReadOnlyList<Expression> ?? arguments.
ToReadOnly
();
1223
ReadOnlyCollection<Expression> argList = argumentList.
ToReadOnly
();
1420
ReadOnlyCollection<Expression> indexList = indexes.
ToReadOnly
();
System\Linq\Expressions\NewArrayExpression.cs (2)
145
ReadOnlyCollection<Expression> initializerList = initializers.
ToReadOnly
();
223
ReadOnlyCollection<Expression> boundsList = bounds.
ToReadOnly
();
System\Linq\Expressions\NewExpression.cs (3)
148
ReadOnlyCollection<Expression> argList = arguments.
ToReadOnly
();
173
ReadOnlyCollection<MemberInfo> memberList = members.
ToReadOnly
();
174
ReadOnlyCollection<Expression> argList = arguments.
ToReadOnly
();
System\Linq\Expressions\RuntimeVariablesExpression.cs (1)
93
ReadOnlyCollection<ParameterExpression> vars = variables.
ToReadOnly
();
System\Linq\Expressions\SwitchCase.cs (1)
87
ReadOnlyCollection<Expression> values = testValues.
ToReadOnly
();
System\Linq\Expressions\SwitchExpression.cs (1)
182
ReadOnlyCollection<SwitchCase> caseList = cases.
ToReadOnly
();
System\Linq\Expressions\TryExpression.cs (1)
157
ReadOnlyCollection<CatchBlock> @catch = handlers.
ToReadOnly
();