Exemplo n.º 1
0
        internal void Load(BizTalkCore.BtsCatalogExplorer explorer, BizTalkCore.SendPortGroup group)
        {
            if (group != null)
            {
                this.QualifiedName     = String.Empty;
                this.status            = group.Status.ToString();
                this.CustomDescription = group.Description;
                this.ApplicationName   = group.Application.Name;

                // Filters
                if (group.Filter != string.Empty)
                {
                    this.FilterGroups = BizTalkInstallation.CreateFilterGroups(group.Filter);
                }
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="explorer"></param>
        /// <param name="port"></param>
        internal void Load(BizTalkCore.BtsCatalogExplorer explorer, BizTalkCore.SendPort port)
        {
            if (port != null)
            {
                this.QualifiedName = String.Empty;
                // Basic properties
                this.trackingType         = (TrackingType)Enum.Parse(typeof(TrackingType), ((int)port.Tracking).ToString());
                this.priority             = port.Priority;
                this.twoWay               = port.IsTwoWay;
                this.dynamic              = port.IsDynamic;
                this.sendPipeline         = port.SendPipeline.FullName;
                this.ApplicationName      = port.Application.Name;
                this.RouteFailedMessage   = port.RouteFailedMessage;
                this.StopSendingOnFailure = port.StopSendingOnFailure;
                this.CustomDescription    = port.Description;

                // Encryption Certificates
                if (port.EncryptionCert != null)
                {
                    this.encryptionCert = new EncryptionCert(port.EncryptionCert);
                }

                // Receive pipeline if two way
                if (this.twoWay)
                {
                    this.receivePipeline = port.ReceivePipeline.FullName;
                }

                // Primary transport
                if (port.PrimaryTransport != null)
                {
                    this.primaryTransport = new TransportInfo(port.PrimaryTransport, true);
                }

                // Secondary transport
                if (port.SecondaryTransport != null && port.SecondaryTransport.Address.Length > 0)
                {
                    this.secondaryTransport = new TransportInfo(port.SecondaryTransport, false);
                }

                // Filters
                if (port.Filter != string.Empty)
                {
                    this.FilterGroups = BizTalkInstallation.CreateFilterGroups(port.Filter);
                }
            }
        }
Exemplo n.º 3
0
        //public NameIdPair SendHandler
        //{
        //    get { return this.sendHandler; }
        //    set { this.sendHandler = value; }
        //}

        #endregion

        #region Load

        /// <summary>
        ///
        /// </summary>
        /// <param name="explorer"></param>
        /// <param name="port"></param>
        internal void Load(BizTalkCore.BtsCatalogExplorer explorer, BizTalkCore.SendPort port)
        {
            if (port != null)
            {
                this.QualifiedName = String.Empty;
                // Basic properties
                this.trackingType = (TrackingType)Enum.Parse(typeof(TrackingType), ((int)port.Tracking).ToString());
                this.priority     = port.Priority;
                this.twoWay       = port.IsTwoWay;
                this.dynamic      = port.IsDynamic;
                //this.sendPipeline = port.SendPipeline.FullName;

                // Fix so to have link for Send Pipeline  CD 20140404
                Pipeline pl = this.Application.ParentInstallation.Pipelines[port.SendPipeline.FullName] as Pipeline;
                if (pl != null)
                {
                    if (pl.Name == port.SendPipeline.FullName)  // Actually check that a match was found.
                    {
                        this.sendPipeline = pl.NameIdPair;
                    }
                    else
                    {
                        this.sendPipeline = new NameIdPair(port.SendPipeline.FullName, "");
                    }
                }

                this.ApplicationName      = port.Application.Name;
                this.RouteFailedMessage   = port.RouteFailedMessage;
                this.StopSendingOnFailure = port.StopSendingOnFailure;
                this.CustomDescription    = port.Description;

                // Encryption Certificates
                if (port.EncryptionCert != null)
                {
                    this.encryptionCert = new EncryptionCert(port.EncryptionCert);
                }

                // Receive pipeline if two way
                if (this.twoWay)
                {
                    //this.receivePipeline = port.ReceivePipeline.FullName; CD 20140405
                    Pipeline rpl = this.Application.ParentInstallation.Pipelines[port.ReceivePipeline.FullName] as Pipeline;
                    if (rpl != null)
                    {
                        if (rpl.Name == port.ReceivePipeline.FullName)  // Actually check that a match was found.
                        {
                            this.ReceivePipeline = rpl.NameIdPair;
                        }
                        else
                        {
                            this.ReceivePipeline = new NameIdPair(port.ReceivePipeline.FullName, "");
                        }
                    }
                }

                // Primary transport
                if (port.PrimaryTransport != null)
                {
                    this.primaryTransport = new TransportInfo(port.PrimaryTransport, true);
                }

                // Secondary transport
                if (port.SecondaryTransport != null && port.SecondaryTransport.Address.Length > 0)
                {
                    this.secondaryTransport = new TransportInfo(port.SecondaryTransport, false);
                }

                // Filters
                if (port.Filter != string.Empty)
                {
                    this.FilterGroups = BizTalkInstallation.CreateFilterGroups(port.Filter);
                }
            }
        }