//private IEnumerable<Host> GetDistinctSendHandlerHosts(string applicationName) //{ // CatalogExplorer.Refresh(); // Application app = CatalogExplorer.Applications[applicationName]; // var query = (from SendPort sp in app.SendPorts // select sp.PrimaryTransport.SendHandler.Host).Union( // from SendPort sp in app.SendPorts // where sp.SecondaryTransport != null // select sp.SecondaryTransport.SendHandler.Host).Distinct(); //} ///// <summary> ///// Starts specified BizTalk application. ///// </summary> ///// <param name="applicationName">The application name to start.</param> //public void StartApplication(string applicationName) //{ // CatalogExplorer.Refresh(); // Application app = CatalogExplorer.Applications[applicationName]; // app.Start(Microsoft.BizTalk.ExplorerOM.ApplicationStartOption.StartAll); // CatalogExplorer.SaveChanges(); // CatalogExplorer.Refresh(); //} /////// <summary> ///// Stops specified BizTalk application. ///// </summary> ///// <param name="applicationName">The application name to stop.</param> //public void StopApplication(string applicationName) //{ // CatalogExplorer.Refresh(); // Application app = CatalogExplorer.Applications[applicationName]; // app.Stop(Microsoft.BizTalk.ExplorerOM.ApplicationStopOption.StopAll); // CatalogExplorer.SaveChanges(); // CatalogExplorer.Refresh(); //} /// <summary> /// Gets HostNames associated with specified application. /// </summary> /// <param name="applicationName">The application name to check.</param> /// <returns>Returns Dictionary (string, bool),(HostName, Whether the host is associated with a dynamic send port)</returns> public Dictionary <string, bool> GetHostNamesWithAsAResultOfDynamicPort(string applicationName) { CatalogExplorer.Refresh(); Application app = CatalogExplorer.Applications[applicationName]; Dictionary <string, bool> result = app.GetHostNamesWithAsAResultOfDynamicPort(); return(result); }
protected override void FillListWithData(ITypeDescriptorContext context, ListView values) { base.FillListWithData(context, values); string inputProperty = EditorUtility.GetInputProperty <string>(context, "BiztalkApplication"); foreach (SendPort sendPort in CatalogExplorer.GetSendPorts(base.BiztalkExplorer, inputProperty)) { if (!sendPort.IsDynamic) { base.AddItem(sendPort.Name, sendPort, new string[0]); } } }