• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class PackageWriterBase

The PackageWriter class.

Inheritance
System.Object
PackageWriterBase
AuthenticationPackageWriter
LanguagePackWriter
LibraryPackageWriter
ModulePackageWriter
ProviderPackageWriter
SkinControlPackageWriter
SkinPackageWriter
WidgetPackageWriter
Namespace: DotNetNuke.Services.Installer.Writers
Assembly: DotNetNuke.dll
Syntax
public class PackageWriterBase : object

Constructors

| Improve this Doc View Source

PackageWriterBase()

Initializes a new instance of the PackageWriterBase class.

Declaration
protected PackageWriterBase()
| Improve this Doc View Source

PackageWriterBase(PackageInfo)

Initializes a new instance of the PackageWriterBase class.

Declaration
public PackageWriterBase(PackageInfo package)
Parameters
Type Name Description
PackageInfo package

The PackageInfo to use to initialize the writer.

Properties

| Improve this Doc View Source

AppCodeFiles

Gets a Dictionary of AppCodeFiles that should be included in the Package.

Declaration
public Dictionary<string, InstallFile> AppCodeFiles { get; }
Property Value
Type Description
Dictionary<System.String, InstallFile>
| Improve this Doc View Source

AppCodePath

Gets or sets the Path for the Package's app code files.

Declaration
public string AppCodePath { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Assemblies

Gets a Dictionary of Assemblies that should be included in the Package.

Declaration
public Dictionary<string, InstallFile> Assemblies { get; }
Property Value
Type Description
Dictionary<System.String, InstallFile>
| Improve this Doc View Source

AssemblyPath

Gets or sets the Path for the Package's assemblies.

Declaration
public string AssemblyPath { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

BasePath

Gets or sets the Base Path for the Package.

Declaration
public string BasePath { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

CleanUpFiles

Gets a Dictionary of CleanUpFiles that should be included in the Package.

Declaration
public SortedList<string, InstallFile> CleanUpFiles { get; }
Property Value
Type Description
SortedList<System.String, InstallFile>
| Improve this Doc View Source

Dependencies

Gets the dependencies.

Declaration
protected virtual Dictionary<string, string> Dependencies { get; }
Property Value
Type Description
Dictionary<System.String, System.String>
| Improve this Doc View Source

Files

Gets a Dictionary of Files that should be included in the Package.

Declaration
public Dictionary<string, InstallFile> Files { get; }
Property Value
Type Description
Dictionary<System.String, InstallFile>
| Improve this Doc View Source

HasProjectFile

Gets or sets a value indicating whether a project file is found in the folder.

Declaration
public bool HasProjectFile { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IncludeAssemblies

Gets a value indicating whether to include Assemblies.

Declaration
public virtual bool IncludeAssemblies { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

LegacyError

Gets or sets whether there are any errors in parsing legacy packages.

Declaration
public string LegacyError { get; set; }
Property Value
Type Description
System.String

And sets whether there are any errors in parsing legacy packages.

| Improve this Doc View Source

Log

Gets the Logger.

Declaration
public Logger Log { get; }
Property Value
Type Description
Logger
| Improve this Doc View Source

Package

Gets or sets the associated Package.

Declaration
public PackageInfo Package { get; set; }
Property Value
Type Description
PackageInfo
| Improve this Doc View Source

Resources

Gets a Dictionary of Resources that should be included in the Package.

Declaration
public Dictionary<string, InstallFile> Resources { get; }
Property Value
Type Description
Dictionary<System.String, InstallFile>
| Improve this Doc View Source

Scripts

Gets a Dictionary of Scripts that should be included in the Package.

Declaration
public Dictionary<string, InstallFile> Scripts { get; }
Property Value
Type Description
Dictionary<System.String, InstallFile>
| Improve this Doc View Source

Versions

Gets a List of Versions that should be included in the Package.

Declaration
public List<string> Versions { get; }
Property Value
Type Description
List<System.String>

Methods

| Improve this Doc View Source

AddFile(InstallFile)

Adds a file to the package.

Declaration
public virtual void AddFile(InstallFile file)
Parameters
Type Name Description
InstallFile file

The file to add.

| Improve this Doc View Source

AddFile(String, String)

Adds a file to the package.

Declaration
protected virtual void AddFile(string fileName, string sourceFileName)
Parameters
Type Name Description
System.String fileName

Name of the file to use in the package.

System.String sourceFileName

Name of the source file.

| Improve this Doc View Source

AddFile(String)

Adds a file to the package.

Declaration
protected virtual void AddFile(string fileName)
Parameters
Type Name Description
System.String fileName

Name of the file to add.

| Improve this Doc View Source

AddResourceFile(InstallFile)

Adds a resource file to the package.

Declaration
public void AddResourceFile(InstallFile file)
Parameters
Type Name Description
InstallFile file

The resource file to add.

| Improve this Doc View Source

ConvertLegacyManifest(XPathNavigator, XmlWriter)

Converts a legacy manifest to current standards.

Declaration
protected virtual void ConvertLegacyManifest(XPathNavigator legacyManifest, XmlWriter writer)
Parameters
Type Name Description
XPathNavigator legacyManifest

The legacy manifest.

XmlWriter writer

The XML writer to use.

| Improve this Doc View Source

CreatePackage(String, String, String, Boolean)

Creates a package.

Declaration
public void CreatePackage(string archiveName, string manifestName, string manifest, bool createManifest)
Parameters
Type Name Description
System.String archiveName

Name of the zip archive to produce.

System.String manifestName

Name of the manifest.

System.String manifest

The manifest content.

System.Boolean createManifest

A value indicating whether to create the manifest.

| Improve this Doc View Source

GetFiles(Boolean, Boolean)

Gets the files to include in the package.

Declaration
protected virtual void GetFiles(bool includeSource, bool includeAppCode)
Parameters
Type Name Description
System.Boolean includeSource

If true, will also include the source code files.

System.Boolean includeAppCode

If true, files in the App_Code folder will also be included.

| Improve this Doc View Source

GetFiles(Boolean)

Gets the files to include in the package.

Declaration
public void GetFiles(bool includeSource)
Parameters
Type Name Description
System.Boolean includeSource

If true, the source code files will also be included.

| Improve this Doc View Source

ParseFiles(DirectoryInfo, String)

Parses the files in a folder.

Declaration
protected virtual void ParseFiles(DirectoryInfo folder, string rootPath)
Parameters
Type Name Description
DirectoryInfo folder

The folder to get the files from.

System.String rootPath

The root path to use so the files are relative in the manifest.

| Improve this Doc View Source

ParseFolder(String, String)

Parses a folder for files recursively.

Declaration
protected virtual void ParseFolder(string folderName, string rootPath)
Parameters
Type Name Description
System.String folderName

Name of the folder to parse.

System.String rootPath

The root path so the files are relative in the manifest.

| Improve this Doc View Source

ParseProjectFile(FileInfo, Boolean)

Parses a project file.

Declaration
protected void ParseProjectFile(FileInfo projFile, bool includeSource)
Parameters
Type Name Description
FileInfo projFile

The proj file to parse.

System.Boolean includeSource

If true, the source code files will also be included.

| Improve this Doc View Source

WriteFilesToManifest(XmlWriter)

Writes the files to the manifest.

Declaration
protected virtual void WriteFilesToManifest(XmlWriter writer)
Parameters
Type Name Description
XmlWriter writer

The XML writer to use.

| Improve this Doc View Source

WriteManifest(Boolean)

WriteManifest writes the manifest associated with this PackageWriter to a string.

Declaration
public string WriteManifest(bool packageFragment)
Parameters
Type Name Description
System.Boolean packageFragment

A flag that indicates whether to return the package element as a fragment (True) or whether to add the outer dotnetnuke and packages elements (False).

Returns
Type Description
System.String

The manifest as a string.

| Improve this Doc View Source

WriteManifest(String, String)

Writes an existing manifest.

Declaration
public void WriteManifest(string manifestName, string manifest)
Parameters
Type Name Description
System.String manifestName

The name of the manifest file.

System.String manifest

The manifest.

Remarks

This overload takes a package manifest and writes it to a file.

| Improve this Doc View Source

WriteManifest(XmlWriter, Boolean)

Writes the manifest.

Declaration
public void WriteManifest(XmlWriter writer, bool packageFragment)
Parameters
Type Name Description
XmlWriter writer

The writer to use.

System.Boolean packageFragment

If true, will not write the start and end Xml elements because we are adding only a fragment.

| Improve this Doc View Source

WriteManifest(XmlWriter, String)

WriteManifest writes a package manifest to an XmlWriter.

Declaration
public void WriteManifest(XmlWriter writer, string manifest)
Parameters
Type Name Description
XmlWriter writer

The XmlWriter.

System.String manifest

The manifest.

Remarks

This overload takes a package manifest and writes it to a Writer.

| Improve this Doc View Source

WriteManifestComponent(XmlWriter)

Writes the manifest component.

Declaration
protected virtual void WriteManifestComponent(XmlWriter writer)
Parameters
Type Name Description
XmlWriter writer

The XML writer to use.

| Improve this Doc View Source

WriteManifestEndElement(XmlWriter)

Writes the manifest end element (closes the packages and root elements).

Declaration
public static void WriteManifestEndElement(XmlWriter writer)
Parameters
Type Name Description
XmlWriter writer

The XML writer to use.

| Improve this Doc View Source

WriteManifestStartElement(XmlWriter)

Writes the manifest start elements.

Declaration
public static void WriteManifestStartElement(XmlWriter writer)
Parameters
Type Name Description
XmlWriter writer

The XML writer to use.

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS