GetExtractedMethod() public static method

public static GetExtractedMethod ( ExtractMethodModel model ) : string
model ExtractMethodModel
return string
Ejemplo n.º 1
0
        private void GeneratePreview()
        {
            _model.Method.MethodName     = _view.MethodName;
            _model.Method.Accessibility  = _view.Accessibility;
            _model.Method.Parameters     = _view.Parameters;
            _model.Method.ReturnValue    = _view.ReturnValue;
            _model.Method.SetReturnValue = _view.SetReturnValue;

            _view.Preview = ExtractMethodRefactoring.GetExtractedMethod(_model);
        }
Ejemplo n.º 2
0
        private void GeneratePreview()
        {
            _model.Method.MethodName     = _view.MethodName;
            _model.Method.Accessibility  = _view.Accessibility;
            _model.Method.Parameters     = _view.Parameters;
            _model.Method.ReturnValue    = _view.ReturnValue;
            _model.Method.SetReturnValue = _view.SetReturnValue;

            var code = ExtractMethodRefactoring.GetExtractedMethod(_model).Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);

            _indenter.Indent(code, "Preview", false);

            _view.Preview = string.Join(Environment.NewLine, code);
        }