C# Класс Projbook.Extension.CSharpExtractor.CSharpSnippetExtractor

Extractor in charge of browsing source directories. load file content and extract requested member.
Наследование: DefaultSnippetExtractor
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Extract ( string fullFilename, string memberPattern ) : string

Extracts a snippet from a given rule pattern.

Приватные методы

Метод Описание
BuildSnippet ( Microsoft.CodeAnalysis.SyntaxNode nodes, CSharpExtractionMode extractionMode ) : string

Builds a snippet from extracted syntax nodes.

DetermineContentPosition ( Microsoft.CodeAnalysis.SyntaxNode node ) : int

Determines the content's block position depending on the node type.

WriteAndCleanupSnippet ( StringBuilder stringBuilder, string lines, CSharpExtractionMode extractionMode, int contentPosition ) : void

Writes and cleanup line snippets. Snippets are moved out of their context, for this reason we need to trim lines aroung and remove a part of the indentation.

Описание методов

Extract() публичный Метод

Extracts a snippet from a given rule pattern.
public Extract ( string fullFilename, string memberPattern ) : string
fullFilename string The full filename (with path) to load and to extract the snippet from.
memberPattern string The member pattern to extract.
Результат string