Ejemplo n.º 1
0
            private IList <VariableInfo> GetMethodParameters(ICollection <VariableInfo> variableInfo)
            {
                var list = new List <VariableInfo>(variableInfo);

                VariableInfo.SortVariables(_semanticDocument.SemanticModel.Compilation, list);
                return(list);
            }
Ejemplo n.º 2
0
            private ImmutableArray <VariableInfo> GetMethodParameters(ICollection <VariableInfo> variableInfo)
            {
                using var _ = ArrayBuilder <VariableInfo> .GetInstance(variableInfo.Count, out var list);

                list.AddRange(variableInfo);

                VariableInfo.SortVariables(_semanticDocument.SemanticModel.Compilation, list);
                return(list.ToImmutable());
            }
            protected VariableInfo GetOutermostVariableToMoveIntoMethodDefinition(CancellationToken cancellationToken)
            {
                var variables = new List <VariableInfo>(this.AnalyzerResult.GetVariablesToMoveIntoMethodDefinition(cancellationToken));

                if (variables.Count <= 0)
                {
                    return(null);
                }

                VariableInfo.SortVariables(SemanticDocument.SemanticModel.Compilation, variables);
                return(variables[0]);
            }
Ejemplo n.º 4
0
            protected VariableInfo GetOutermostVariableToMoveIntoMethodDefinition(CancellationToken cancellationToken)
            {
                using var _ = ArrayBuilder <VariableInfo> .GetInstance(out var variables);

                variables.AddRange(AnalyzerResult.GetVariablesToMoveIntoMethodDefinition(cancellationToken));
                if (variables.Count <= 0)
                {
                    return(null);
                }

                VariableInfo.SortVariables(SemanticDocument.SemanticModel.Compilation, variables);
                return(variables[0]);
            }