C# 클래스 Docnet.Utils

파일 보기 프로젝트 열기: FransBouma/DocNet

공개 메소드들

메소드 설명
ConvertMarkdownToHtml ( string toConvert, string destinationDocumentPath, string siteRoot, string sourceDocumentFilename, string>.List createdAnchorCollector ) : string

Converts the markdown to HTML.

CreateFoldersIfRequired ( string fullPath ) : void

Creates the folders in the path specified if they don't exist, recursively

DirectoryCopy ( string sourceFolderName, string destinationFolderName, bool copySubFolders ) : void

Copies directories and files, eventually recursively. From MSDN.

IncludeProcessor ( String content, string includeFolder ) : string

Process the input for @@include tags and embeds the included content into the output.

MakeAbsolutePath ( string rootPath, string toMakeAbsolute ) : string

Makes toMakeAbsolute an absolute path, if it's not already a rooted path. If it's not a rooted path it's assumed it's relative to rootPath and is combined with that.

MakeRelativePath ( string fromPath, string toPath ) : string

Creates a relative path to get from fromPath to toPath. If one of them is empty, the emptystring is returned. If there's no common path, toPath is returned.

Only works with file paths, which is ok, as it's used to create the {{Path}} macro.

MakeRelativePathForUri ( string fromPath, string toPath ) : string

As MakeRelativePath but it also converts '\' to '/'.

Only works with file paths, which is ok, as it's used to create the {{Path}} macro.

메소드 상세

ConvertMarkdownToHtml() 공개 정적인 메소드

Converts the markdown to HTML.
public static ConvertMarkdownToHtml ( string toConvert, string destinationDocumentPath, string siteRoot, string sourceDocumentFilename, string>.List createdAnchorCollector ) : string
toConvert string The markdown string to convert.
destinationDocumentPath string The document path (without the document filename).
siteRoot string The site root.
sourceDocumentFilename string the filename of the source markdown file
createdAnchorCollector string>.List The created anchor collector, for ToC sublinks for H2 headers.
리턴 string

CreateFoldersIfRequired() 공개 정적인 메소드

Creates the folders in the path specified if they don't exist, recursively
public static CreateFoldersIfRequired ( string fullPath ) : void
fullPath string The full path.
리턴 void

DirectoryCopy() 공개 정적인 메소드

Copies directories and files, eventually recursively. From MSDN.
public static DirectoryCopy ( string sourceFolderName, string destinationFolderName, bool copySubFolders ) : void
sourceFolderName string Name of the source dir.
destinationFolderName string Name of the dest dir.
copySubFolders bool if set to true it will recursively copy files/folders.
리턴 void

IncludeProcessor() 공개 정적인 메소드

Process the input for @@include tags and embeds the included content into the output.
public static IncludeProcessor ( String content, string includeFolder ) : string
content String content to be scanned for include tags
includeFolder string Directory containing the include files (absolute folder)
리턴 string

MakeAbsolutePath() 공개 정적인 메소드

Makes toMakeAbsolute an absolute path, if it's not already a rooted path. If it's not a rooted path it's assumed it's relative to rootPath and is combined with that.
public static MakeAbsolutePath ( string rootPath, string toMakeAbsolute ) : string
rootPath string The root path.
toMakeAbsolute string To make absolute.
리턴 string

MakeRelativePath() 공개 정적인 메소드

Creates a relative path to get from fromPath to toPath. If one of them is empty, the emptystring is returned. If there's no common path, toPath is returned.
Only works with file paths, which is ok, as it's used to create the {{Path}} macro.
public static MakeRelativePath ( string fromPath, string toPath ) : string
fromPath string From path.
toPath string To path.
리턴 string

MakeRelativePathForUri() 공개 정적인 메소드

As MakeRelativePath but it also converts '\' to '/'.
Only works with file paths, which is ok, as it's used to create the {{Path}} macro.
public static MakeRelativePathForUri ( string fromPath, string toPath ) : string
fromPath string From path.
toPath string To path.
리턴 string