/// <summary> /// Ensures that the local collection of BPEL files is loaded. This collection /// is only loaded once. It can be updated by the AddNewWorkflow method. /// </summary> private void LoadWorkflowFileCollection() { if (this.defaultWorkflows == null) { lock (this.lockObject) { // check if the collection exists again just in case someone else got a lock // between when the check above found null and this method execution got the // lock. if (this.defaultWorkflows == null) { // load list of BPEL files into local collection WorkflowHandlerSettingsConfigSection section = UnitlHelp.GetWorkflowHandlerSettingsConfigSection(); // parse the list of BPEL files into a hash table with the latest version // of each workflow and a 2nd table with earlier versions. // This allows for default workflows to be quickly located while // still being able to find earlier workflows in the infrequent cases // where this may be necessaary. this.defaultWorkflows = new System.Collections.Hashtable(); this.olderWorkflows = new WorkflowFilesCollection(); if (section != null) { foreach (WorkflowFileElement fileElement in section.WorkflowFiles) { this.AddNewWorkflow(fileElement); } } } } } }