Example #1
0
 /// <summary>
 /// Default Constructor.
 /// </summary>
 /// <param name="engine">The nexdox engine containing all the streams.</param>
 /// <param name="appInfo">Application Info created by NexdoxLaunch and passed to the program on declaration.</param>
 public Allocation(
     NexdoxEngine engine,
     ApplicationInfo appInfo,
     IConFileService conFileService,
     IXmlFileService xmlFileService,
     IZipFileService zipFileService,
     IDocTypeService docTypeService,
     IManCoService manCoService)
 {
     this._engine    = engine;
     this._appInfo   = appInfo;
     _conFileService = conFileService;
     _xmlFileService = xmlFileService;
     _zipFileService = zipFileService;
     _docTypeService = docTypeService;
     _manCoService   = manCoService;
 }
Example #2
0
        /// <summary>
        /// Initialise static variables.
        /// </summary>
        /// <param name="engine">Nexdox Engine created by NexdoxLaunch and passed to the program on declaration.</param>
        /// <param name="appInfo">Application Info created by NexdoxLaunch and passed to the program on declaration.</param>
        static public void Initialise(NexdoxEngine engine, ApplicationInfo appInfo)
        {
            OverwriteDataFiles     = bool.Parse(appInfo["OverwriteDataFiles"]);
            HugeFileSplitThreshold = Int32.Parse(appInfo["HugeFileSplitThreshold"]) * 1000;
            CntFilesRoutingMode    = appInfo["CntFilesRoutingMode"];
            SilentTest             = bool.Parse(appInfo["SilentTest"]);
            UnitySQLServer         = appInfo["UnitySQLServer"];
            //Resource Manager
            NexdoxResourceManager.Mode processingMode = NexdoxResourceManager.Mode.ProcessingNoDamConnection;
            switch (appInfo["DAMConnection"])
            {
            case "Compulsory":
                processingMode = NexdoxResourceManager.Mode.ProcessingCompulsoryDamConnection;
                break;

            case "Optional":
                processingMode = NexdoxResourceManager.Mode.ProcessingOptionalDamConnection;
                break;
            }

            string region = appInfo["Region"];

            NexdoxMessaging.SendMessage(string.Format("Setting up region: {0} resource manager", region), false, null);
            Resources = new NexdoxResourceManager(appInfo.ApplicationID, new DirectoryInfo(appInfo.ResourcePath), engine, processingMode, region);
            Resources.ResourceManagerAsset.GetLatestFromDam();
            CentralResources = Resources.ExternalApps[0];
            CentralResources.ResourceManagerAsset.GetLatestFromDam();

            //Read ManCoSettings from RMC
            ManagementCompanySettings = new ManCoSettingsCollection(CentralResources, NexdoxSettings.FontCollection, true);

            AppsToIgnore = new List <string>();

            //These applications will not be allocated data, the datafiles will be ignored
            FieldList ignoreApps = new FieldList(appInfo["AppsToIgnore"], ",", "\"", FieldList.SplitMethod.MicrosoftExcel);

            foreach (string app in ignoreApps)
            {
                AppsToIgnore.Add(app.ToUpper());
            }

            zipPackage = new ZipPackageCollection();

            //NTUtils.Statics.SharedFolderPath = appInfo["SharedResourceFolder"];
        }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Allocation" /> class.
 /// </summary>
 /// <param name="engine">The engine.</param>
 /// <param name="appInfo">The application information.</param>
 /// <param name="documentService">The document service.</param>
 /// <param name="documentApprovalService">The document approval service.</param>
 /// <param name="subDocTypeService">The sub document type service.</param>
 public Allocation(
     NexdoxEngine engine,
     ApplicationInfo appInfo,
     IDocumentService documentService,
     IAutoApprovalService documentApprovalService,
     ISubDocTypeService subDocTypeService,
     IGridRunEngine gridRunEngine,
     IManCoService manCoService,
     IApprovalEngine approvalEngine,
     IGridRunService gridRunService)
 {
     _engine                  = engine;
     _appInfo                 = appInfo;
     _documentService         = documentService;
     _documentApprovalService = documentApprovalService;
     _subDocTypeService       = subDocTypeService;
     _gridRunEngine           = gridRunEngine;
     _manCoService            = manCoService;
     _approvalEngine          = approvalEngine;
     _gridRunService          = gridRunService;
 }
Example #4
0
 public static void Initialise(NexdoxEngine engine, ApplicationInfo appInfo)
 {
     UnitySQLServer = appInfo["UnitySQLServer"];
 }
Example #5
0
 /// <summary>
 /// Default Constructor.
 /// </summary>
 /// <param name="appInfo">Application Info created by NexdoxLaunch and passed to the program on declaration.</param>
 public Process(ApplicationInfo appInfo, NexdoxEngine engine)
 {
     _appInfo = appInfo;
     _engine  = engine;
 }