CodeFactory for Windows CodeFactory for Windows
CodeFactory for Windows CodeFactory for Windows
CodeFactory

Search Results for

    Class ConfigManager

    Static class that manages the creation and reading of code factory configuration files.

    Inheritance
    object
    ConfigManager
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: CodeFactory.WinVs.Loader
    Assembly: CodeFactory.WinVs.dll
    Syntax
    public static class ConfigManager

    Fields

    DEBUG_CONFIG_FILE_NAME

    Constant that holds the name of the debug version of the config file.

    Declaration
    public const string DEBUG_CONFIG_FILE_NAME = "debug.cfConfig"
    Field Value
    Type Description
    string

    PACKAGE_CONFIG_FILE_NAME

    Constant that holds the name of the configuration file to be stored in the configuration package.

    Declaration
    public const string PACKAGE_CONFIG_FILE_NAME = "config.cfConfig"
    Field Value
    Type Description
    string

    PACKAGE_CONFIG_NAMESPACE

    Constant that holds the xml namespace for the package configuration information.

    Declaration
    public const string PACKAGE_CONFIG_NAMESPACE = "http://schema.codefactory.software/codefactory/v1.0/package/config"
    Field Value
    Type Description
    string

    PACKAGE_CONFIG_VIRTUAL_FILEPATH

    Constant that holds the replacement string information for the logical path for configuration data.

    Declaration
    public const string PACKAGE_CONFIG_VIRTUAL_FILEPATH = "Config\\{0}"
    Field Value
    Type Description
    string

    PACKAGE_FILE_EXTENSION

    Constant that holds the file extension for code factory extension.

    Declaration
    public const string PACKAGE_FILE_EXTENSION = ".cfa"
    Field Value
    Type Description
    string

    PACKAGE_LIBRARIES_NAMESPACE

    Constant that holds the xml namespace for the package libraries information.

    Declaration
    public const string PACKAGE_LIBRARIES_NAMESPACE = "http://schema.codefactory.software/codefactory/v1.0/package/libraries"
    Field Value
    Type Description
    string

    PACKAGE_LIBRARIES_VIRTUAL_FILEPATH

    Constant that holds the replacement string information for the logical path for library data.

    Declaration
    public const string PACKAGE_LIBRARIES_VIRTUAL_FILEPATH = "Libraries\\{0}"
    Field Value
    Type Description
    string

    Methods

    CopyStreamData(Stream, Stream)

    Extension method that copies data from one stream to another.

    Declaration
    public static bool CopyStreamData(this Stream source, Stream targetStream)
    Parameters
    Type Name Description
    Stream source

    Source stream to read from.

    Stream targetStream

    Target stream to write data to.

    Returns
    Type Description
    bool

    Flag that determines if the stream copy completed successfully.

    CreateCodeFactoryPackage(VsFactoryConfiguration, string, string)

    Creates a code factory package that consolidates the needed libraries and configuration for a code factory into one file.

    Declaration
    public static bool CreateCodeFactoryPackage(VsFactoryConfiguration sourceConfiguration, string targetDirectory, string targetPackageName)
    Parameters
    Type Name Description
    VsFactoryConfiguration sourceConfiguration

    The loaded factory configuration information to be loaded into a package file.

    string targetDirectory

    The directory the package will be placed in.

    string targetPackageName

    The file name of the package that will be created. The package extension of cfa will be appended to the package name.

    Returns
    Type Description
    bool

    CreatePackageFile(VsFactoryConfiguration, List<VsPackageFileConfig>, string)

    Static helper method that creates a code factory extension file.

    Declaration
    public static bool CreatePackageFile(VsFactoryConfiguration config, List<VsPackageFileConfig> packageFiles, string packageFilePath)
    Parameters
    Type Name Description
    VsFactoryConfiguration config

    The factory configuration to load into the factory extension file.

    List<VsPackageFileConfig> packageFiles

    List of the package files to load into the factory extension file.

    string packageFilePath

    The fully qualified name of the package file to be created.

    Returns
    Type Description
    bool

    Flag that determines if the factory file was created or not.

    ExtractLibrariesFromPackage(string, string, List<string>)

    Extracts a library file from the package and writes it to the target directory and library name.

    Declaration
    public static VsPackageExtractResult ExtractLibrariesFromPackage(string packageFilePath, string targetDirectory, List<string> libraries)
    Parameters
    Type Name Description
    string packageFilePath

    The fully qualified file path for the code factory package.

    string targetDirectory

    The directory the library should be copied to.

    List<string> libraries

    List of the files to be extracted to the target directory.

    Returns
    Type Description
    VsPackageExtractResult

    The results of the extract are always returned.

    LoadFactoryConfiguration(string)

    Loads the factory configuration from the package.

    Declaration
    public static PackageReadResult<VsFactoryConfiguration> LoadFactoryConfiguration(string packageFilePath)
    Parameters
    Type Name Description
    string packageFilePath

    The fully qualified path to the Code Factory package.

    Returns
    Type Description
    PackageReadResult<VsFactoryConfiguration>

    Package read result with either the error that occurred or the fully loaded factory configuration.

    © CodeFactory, LLC. All rights reserved.