private string GetXmlContent(BtsOrchestration orchestration) { StringBuilder sb = new StringBuilder(); try { string xmlContent = string.Empty; string path = Microsoft.BizTalk.Gac.Gac.GetAssemblyPath(orchestration.BtsAssembly.Name); BizTalkAssembly assembly1 = new BizTalkAssembly(); Microsoft.BizTalk.Deployment.Assembly.BtsAssemblyManager manager = new Microsoft.BizTalk.Deployment.Assembly.BtsAssemblyManager(path, assembly1); IBizTalkAssembly ass = (IBizTalkAssembly)manager.AssemblyBase; IEnumerator orList = ass.Orchestrations; while (orList.MoveNext()) { IBizTalkOrchestration or = (IBizTalkOrchestration)orList.Current; xmlContent = or.XmlContent; xmlContent = xmlContent.Replace("'", "\""); sb.AppendLine("#if __DESIGNER_DATA"); sb.AppendLine("#error Do not define __DESIGNER_DATA."); sb.AppendLine(xmlContent); sb.AppendLine("#endif // __DESIGNER_DATA"); } } catch (Exception exe) { sb.Append("Can not load Odx content: " + exe.Message); } return(sb.ToString()); }
public ActionResult Assembly(string applicationName, string artifactid, string version) { Manifest manifest = ManifestReader.GetCurrentManifest(version, Request.PhysicalApplicationPath); BizTalkInstallation installation = InstallationReader.GetBizTalkInstallation(manifest); BizTalkApplication application = installation.Applications[applicationName]; BizTalkAssembly assembly = application.Assemblies[artifactid]; var breadCrumbs = new List <BizTalkBaseObject> { application, assembly }; return(View(new AssemblyViewModel( application, ManifestReader.GetAllManifests(Request.PhysicalApplicationPath), manifest, breadCrumbs, installation.Applications.Values, installation.Hosts.Values, assembly))); }
internal static BizTalkAssembly TransforModel(Microsoft.BizTalk.ExplorerOM.BtsAssembly omAssembly) { var assembly = new BizTalkAssembly(); assembly.QualifiedName = omAssembly.DisplayName; assembly.Name = omAssembly.Name; assembly.Version = omAssembly.Version; assembly.PublicKeyToken = omAssembly.PublicKeyToken; assembly.Culture = omAssembly.Culture; return(assembly); }
internal static BizTalkAssembly TransforModel(Microsoft.BizTalk.ExplorerOM.BtsAssembly omAssembly) { var assembly = new BizTalkAssembly(); assembly.QualifiedName = omAssembly.DisplayName; assembly.Name = omAssembly.Name; assembly.Version = omAssembly.Version; assembly.PublicKeyToken = omAssembly.PublicKeyToken; assembly.Culture = omAssembly.Culture; return assembly; }
internal static void SetReferences(BizTalkAssembly assembly, BizTalkArtifacts artifacts, Microsoft.BizTalk.ExplorerOM.BtsAssembly omAssembly) { assembly.Application = artifacts.Applications[omAssembly.Application.Id()]; foreach (Microsoft.BizTalk.ExplorerOM.BtsOrchestration omOrchestration in omAssembly.Orchestrations) { assembly.Orchestrations.Add(artifacts.Orchestrations[omOrchestration.Id()]); } foreach (Microsoft.BizTalk.ExplorerOM.Schema omSchema in omAssembly.Schemas) { assembly.Schemas.Add(artifacts.Schemas[omSchema.Id()]); } foreach (Microsoft.BizTalk.ExplorerOM.Transform omTransform in omAssembly.Transforms) { assembly.Transforms.Add(artifacts.Transforms[omTransform.Id()]); } foreach (Microsoft.BizTalk.ExplorerOM.Pipeline omPipeline in omAssembly.Pipelines) { assembly.Pipelines.Add(artifacts.Pipelines[omPipeline.Id()]); } }
public AssemblyViewModel(BizTalkApplication currentApplication, IEnumerable <Manifest> manifests, Manifest currentManifest, IEnumerable <BizTalkBaseObject> breadCrumbs, IEnumerable <BizTalkApplication> applications, IEnumerable <Host> hosts, BizTalkAssembly assembly) : base(currentApplication, manifests, currentManifest, breadCrumbs, applications, hosts) { Assembly = assembly; }