Метод | Описание | |
---|---|---|
AddAttribute ( EntityDeclaration entity, AttributeSection attr ) : void |
Adds an attribute section to a given entity.
|
|
AddTo ( BlockStatement bodyStatement, AstNode newNode ) : void | ||
AddTo ( TypeDeclaration typeDecl, EntityDeclaration entityDecl ) : void | ||
ChangeBaseTypes ( TypeDeclaration type, IEnumerable |
Changes the base types of a type declaration.
|
|
ChangeModifier ( EntityDeclaration entity, Modifiers modifiers ) : void |
Changes the modifier of a given entity declaration.
|
|
ChangeModifier ( ParameterDeclaration param, ParameterModifier modifier ) : void | ||
CreateNewType ( AstNode newType, NewTypeContext context = NewTypeContext.CurrentNamespace ) : void |
Creates a new file containing the type, namespace and correct usings. (Note: Should take care of IDE specific things, file headers, add to project, correct name).
|
|
Dispose ( ) : void | ||
DoGlobalOperationOn ( IEnumerable |
||
FormatText ( ) : void | ||
FormatText ( IEnumerable |
||
GetCurrentOffset ( TextLocation originalDocumentLocation ) : int |
Given an offset in the original document (at the start of script execution), returns the offset in the current document.
|
|
GetCurrentOffset ( int originalDocumentOffset ) : int |
Given an offset in the original document (at the start of script execution), returns the offset in the current document.
|
|
GetSegment ( AstNode node ) : ISegment |
Gets the current text segment of the specified AstNode.
|
|
InsertAfter ( AstNode node, AstNode newNode ) : void | ||
InsertBefore ( AstNode node, AstNode newNode ) : void | ||
InsertText ( int offset, string newText ) : void | ||
InsertWithCursor ( string operation, ICSharpCode.NRefactory.TypeSystem.ITypeDefinition parentType, Func |
||
InsertWithCursor ( string operation, ICSharpCode.NRefactory.TypeSystem.ITypeDefinition parentType, Func nodeCallback ) : Task | ||
InsertWithCursor ( string operation, InsertPosition defaultPosition ) : Task | ||
InsertWithCursor ( string operation, InsertPosition defaultPosition, IList |
||
Link ( ) : System.Threading.Tasks.Task | ||
Link ( IEnumerable |
||
Remove ( AstNode node, bool removeEmptyLine = true ) : void | ||
RemoveAttribute ( |
Safely removes an attribue from it's section (removes empty sections).
|
|
RemoveText ( int offset, int length ) : void | ||
Rename ( ISymbol symbol, string name = null ) : void |
Renames the specified symbol.
|
|
Replace ( AstNode node, AstNode replaceWith ) : void | ||
Replace ( int offset, int length, string newText ) : void |
Replaces text.
|
|
Select ( AstNode node ) : void | ||
Select ( TextLocation start, TextLocation end ) : void | ||
Select ( int startOffset, int endOffset ) : void |
Метод | Описание | |
---|---|---|
CreateTrackedSegment ( int offset, int length ) : ISegment |
Creates a tracked segment for the specified (offset,length)-segment. Offset is interpreted to be an offset in the current document.
|
|
GetIndentLevelAt ( int offset ) : int | ||
OutputNode ( int indentLevel, AstNode node, bool startWithNewLine = false ) : ICSharpCode.NRefactory.CSharp.Refactoring.NodeOutput | ||
Script ( CSharpFormattingOptions formattingOptions, TextEditorOptions options ) : System |
Метод | Описание | |
---|---|---|
CorrectFormatting ( AstNode node, AstNode newNode ) : void | ||
DoesInsertingAfterRequireNewline ( AstNode node ) : bool | ||
IndentLevelFor ( AstNode node ) : int | ||
PrefixFor ( AstNode node, AstNode newNode ) : string |
public AddAttribute ( EntityDeclaration entity, AttributeSection attr ) : void | ||
entity | EntityDeclaration | The entity to add the attribute to. |
attr | AttributeSection | The attribute to add. |
Результат | void |
public AddTo ( BlockStatement bodyStatement, AstNode newNode ) : void | ||
bodyStatement | BlockStatement | |
newNode | AstNode | |
Результат | void |
public AddTo ( TypeDeclaration typeDecl, EntityDeclaration entityDecl ) : void | ||
typeDecl | TypeDeclaration | |
entityDecl | EntityDeclaration | |
Результат | void |
public ChangeBaseTypes ( TypeDeclaration type, IEnumerable |
||
type | TypeDeclaration | The type declaration to modify. |
baseTypes | IEnumerable |
The new base types. |
Результат | void |
public ChangeModifier ( EntityDeclaration entity, Modifiers modifiers ) : void | ||
entity | EntityDeclaration | The entity. |
modifiers | Modifiers | The new modifiers. |
Результат | void |
public ChangeModifier ( ParameterDeclaration param, ParameterModifier modifier ) : void | ||
param | ParameterDeclaration | |
modifier | ParameterModifier | |
Результат | void |
public CreateNewType ( AstNode newType, NewTypeContext context = NewTypeContext.CurrentNamespace ) : void | ||
newType | AstNode | /// New type to be created. /// |
context | NewTypeContext | /// The Context in which the new type should be created. /// |
Результат | void |
protected abstract CreateTrackedSegment ( int offset, int length ) : ISegment | ||
offset | int | |
length | int | |
Результат | ISegment |
public DoGlobalOperationOn ( IEnumerable |
||
entities | IEnumerable |
|
callback | Action |
|
operationDescription | string | |
Результат | void |
public abstract FormatText ( IEnumerable |
||
nodes | IEnumerable |
|
Результат | void |
public abstract GetCurrentOffset ( TextLocation originalDocumentLocation ) : int | ||
originalDocumentLocation | TextLocation | |
Результат | int |
public abstract GetCurrentOffset ( int originalDocumentOffset ) : int | ||
originalDocumentOffset | int | |
Результат | int |
protected GetIndentLevelAt ( int offset ) : int | ||
offset | int | |
Результат | int |
public GetSegment ( AstNode node ) : ISegment | ||
node | AstNode | The node to get the segment for. |
Результат | ISegment |
public InsertAfter ( AstNode node, AstNode newNode ) : void | ||
node | AstNode | |
newNode | AstNode | |
Результат | void |
public InsertBefore ( AstNode node, AstNode newNode ) : void | ||
node | AstNode | |
newNode | AstNode | |
Результат | void |
public InsertText ( int offset, string newText ) : void | ||
offset | int | |
newText | string | |
Результат | void |
public InsertWithCursor ( string operation, ICSharpCode.NRefactory.TypeSystem.ITypeDefinition parentType, Func |
||
operation | string | |
parentType | ICSharpCode.NRefactory.TypeSystem.ITypeDefinition | |
nodeCallback | Func |
|
Результат | Task |
public InsertWithCursor ( string operation, ICSharpCode.NRefactory.TypeSystem.ITypeDefinition parentType, Func nodeCallback ) : Task | ||
operation | string | |
parentType | ICSharpCode.NRefactory.TypeSystem.ITypeDefinition | |
nodeCallback | Func | |
Результат | Task |
public InsertWithCursor ( string operation, InsertPosition defaultPosition ) : Task | ||
operation | string | |
defaultPosition | InsertPosition | |
Результат | Task |
public InsertWithCursor ( string operation, InsertPosition defaultPosition, IList |
||
operation | string | |
defaultPosition | InsertPosition | |
nodes | IList |
|
Результат | Task |
public Link ( ) : System.Threading.Tasks.Task | ||
Результат | System.Threading.Tasks.Task |
public Link ( IEnumerable |
||
nodes | IEnumerable |
|
Результат | System.Threading.Tasks.Task |
protected OutputNode ( int indentLevel, AstNode node, bool startWithNewLine = false ) : ICSharpCode.NRefactory.CSharp.Refactoring.NodeOutput | ||
indentLevel | int | |
node | AstNode | |
startWithNewLine | bool | |
Результат | ICSharpCode.NRefactory.CSharp.Refactoring.NodeOutput |
public abstract Remove ( AstNode node, bool removeEmptyLine = true ) : void | ||
node | AstNode | |
removeEmptyLine | bool | |
Результат | void |
public RemoveAttribute ( |
||
attr | The attribute to be removed. | |
Результат | void |
public RemoveText ( int offset, int length ) : void | ||
offset | int | |
length | int | |
Результат | void |
public Rename ( ISymbol symbol, string name = null ) : void | ||
symbol | ISymbol | /// The symbol to rename /// |
name | string | /// The new name, if null the user is prompted for a new name. /// |
Результат | void |
public Replace ( AstNode node, AstNode replaceWith ) : void | ||
node | AstNode | |
replaceWith | AstNode | |
Результат | void |
public abstract Replace ( int offset, int length, string newText ) : void | ||
offset | int | The starting offset of the text to be replaced. |
length | int | The length of the text to be replaced. |
newText | string | The new text. |
Результат | void |
protected Script ( CSharpFormattingOptions formattingOptions, TextEditorOptions options ) : System | ||
formattingOptions | CSharpFormattingOptions | |
options | TextEditorOptions | |
Результат | System |
public Select ( TextLocation start, TextLocation end ) : void | ||
start | TextLocation | |
end | TextLocation | |
Результат | void |
public Select ( int startOffset, int endOffset ) : void | ||
startOffset | int | |
endOffset | int | |
Результат | void |