Example #1
0
     protected NOPApplication()
     {
        ApplicationModel.ExecutionContext.__SetApplicationLevelContext(this, null, null, NOPSession.Instance);

        m_Configuration = new MemoryConfiguration();
        m_Configuration.Create();

        m_StartTime = DateTime.Now;
     }
Example #2
0
      /// <summary>
      /// Generates packaging manifest for the specified directory. Optionally may specify root node name
      /// </summary>
      /// <param name="directory">Source directory to generate manifest for</param>
      /// <param name="rootNodeName">Name of root manifest node, if omitted then 'package' is defaulted</param>
      /// <param name="packageName">Optional 'name' attribute value under root node</param>
      /// <param name="packageLocalPath">Optional 'local-path' attribute value under root node</param>
      public static ConfigSectionNode GeneratePackagingManifest(this FileSystemDirectory directory,
                                                                string rootNodeName = null,
                                                                string packageName = null,
                                                                string packageLocalPath = null)
      {
        if (directory==null)
         throw new NFXIOException(StringConsts.ARGUMENT_ERROR + "GeneratePackagingManifest(directory==null)");

        var conf = new MemoryConfiguration();
        conf.Create(rootNodeName.IsNullOrWhiteSpace()?CONFIG_PACKAGE_SECTION : rootNodeName); 
        var root = conf.Root; 
        if (packageName.IsNotNullOrWhiteSpace())
          root.AddAttributeNode(CONFIG_NAME_ATTR, packageName);
        
        if (packageLocalPath.IsNotNullOrWhiteSpace())
          root.AddAttributeNode(CONFIG_LOCAL_PATH_ATTR, packageLocalPath);
        
        buildDirLevel(root, directory);

        root.ResetModified();

        return root;
      }