public Orchestration GetOrchestration(string assemblyName, string orchestrationName) { Orchestration orch = null; try { this.InitExplorer(this.server, this.mgmtDatabaseName); BizTalkCore.BtsAssembly asm = null; foreach (BizTalk.ExplorerOM.BtsAssembly a in this.explorer.Assemblies) { if (a.DisplayName == assemblyName) { asm = a; break; } } BizTalk.ExplorerOM.BtsOrchestration o = asm.Orchestrations[orchestrationName]; orch = new Orchestration(o.FullName); orch.Load(this.explorer, o); } catch (Exception ex) { TraceManager.SmartTrace.TraceError(ex); } return(orch); }
/// <summary> /// Creates a new <see cref="BizTalkAssembly"/> /// </summary> /// <param name="btsAssembly"></param> public BizTalkAssembly(BizTalkCore.BtsAssembly btsAssembly) : this() { this.culture = btsAssembly.Culture; this.displayName = btsAssembly.DisplayName; this.version = btsAssembly.Version; this.publicKeyToken = btsAssembly.PublicKeyToken; //this.QualifiedName = String.Format("{0},{1},{2},{3}", this.displayName, this.version, this.culture, this.PublicKeyToken); this.QualifiedName = this.DisplayName; Assembly assembly = null; try { // Load the assembly type information assembly = Assembly.Load(btsAssembly.DisplayName); // Initialize from the assembly type information this.Initialize(assembly); } catch (FileNotFoundException ex) { // The assembly cannot be loaded from the GAC... TraceManager.SmartTrace.TraceError("The assembly could not be loaded from the GAC"); TraceManager.SmartTrace.TraceError(ex); } finally { assembly = null; } }
/// <summary> /// /// </summary> internal override void FixReferences(BizTalkCore.BtsCatalogExplorer explorer) { TraceManager.SmartTrace.TraceIn(explorer); BizTalkCore.BtsAssembly assembly = this.GetAssemblyByDisplayName(explorer); if (assembly != null) { FixSchemaReferences(assembly); FixMapReferences(assembly); FixPipelineReferences(assembly); FixOrchReferences(assembly); } else { TraceManager.SmartTrace.TraceError("Could not locate assembly. References will not be fixed."); } TraceManager.SmartTrace.TraceOut(); return; }
/// <summary> /// /// </summary> /// <param name="explorer"></param> /// <param name="schema"></param> public void Load(BizTalkCore.BtsCatalogExplorer explorer, BizTalkCore.BtsAssembly assembly) { this.Name = assembly.Name; this.displayName = assembly.DisplayName; }