C# 클래스 Rock.Services.NuGet.PackageService

Facade class to provide intaraction with NuGet internals
파일 보기 프로젝트 열기: NewSpring/Rock 1 사용 예제들

공개 메소드들

메소드 설명
ExportPage ( Page page, bool isRecursive ) : MemoryStream

Exports the page.

ImportPage ( byte uploadedPackage, string fileName, int pageId, int siteId ) : bool

Imports the page.

PackageService ( ) : System

Initializes a new instance of the PackageService class.

비공개 메소드들

메소드 설명
AddToManifest ( Manifest manifest, string directory, string webRootPath, string filterPattern = "*.*", SearchOption searchOption = SearchOption.AllDirectories ) : void

Add the given directories files (matching the given file filter and search options) to the manifest.

CreatePackageDirectory ( string pageName, string packageId ) : DirectoryInfo

Creates a unique directory for temporarily holding the page export package.

ExpandFiles ( IEnumerable packageFiles ) : void

Expands the files.

FindNewBlockTypes ( Page page, IEnumerable installedBlockTypes ) : IEnumerable

Iterates recursively through all BlockTypes associated with a Page and its children and compares them with the list of BlockTypes that are currently installed.

FindUniqueBlockTypesAndDirectories ( Page page, bool isRecursive, BlockType>.Dictionary blockTypes, string>.Dictionary directories ) : void

Finds the unique block types and directories for the given page and adds them to the blockTypes and directories dictionaries.

GetJson ( Page page, bool isRecursive ) : string

Gets the json for this page.

SavePages ( RockContext rockContext, Page page, IEnumerable newBlockTypes, int parentPageId, int siteId ) : void

Recursively saves Pages and associated Blocks, PageRoutes and PageContexts.

ScrubIds ( IEntity entity ) : void
ValidateImportData ( Page page, IEnumerable newBlockTypes ) : void

Validates the import data.

메소드 상세

ExportPage() 공개 메소드

Exports the page.
public ExportPage ( Page page, bool isRecursive ) : MemoryStream
page Page The page.
isRecursive bool if set to true [should export children].
리턴 System.IO.MemoryStream

ImportPage() 공개 메소드

Imports the page.
public ImportPage ( byte uploadedPackage, string fileName, int pageId, int siteId ) : bool
uploadedPackage byte Byte array of the uploaded package
fileName string File name of uploaded package
pageId int The Id of the Page to save new data underneath
siteId int The Id of the Site tha the Page is being imported into
리턴 bool

PackageService() 공개 메소드

Initializes a new instance of the PackageService class.
public PackageService ( ) : System
리턴 System