Esempio n. 1
0
        /// <summary>parses the addr list</summary>
        private void ParseAddrList(string addrList, Codec codec,
                                   IList /* TaggedComponent */ additionalComponents)
        {
            if (addrList == null)
            {
                throw new BAD_PARAM(8, CompletionStatus.Completed_No);
            }
            string[] parts = addrList.Split(',');
            // at least one!
            m_objAddrs = new CorbaLocObjAddr[parts.Length];
            m_profiles = new IorProfile[parts.Length];

            for (int i = 0; i < parts.Length; i++)
            {
                if (CorbaLocIiopAddr.IsResponsibleForProtocol(parts[i]))
                {
                    m_objAddrs[i] = new CorbaLocIiopAddr(parts[i]);
                }
                else if (CorbaLocIiopSslAddr.IsResponsibleForProtocol(parts[i]))
                {
                    m_objAddrs[i] = new CorbaLocIiopSslAddr(parts[i]);
                }
                else
                {
                    throw new BAD_PARAM(8, CompletionStatus.Completed_No);
                }
                m_profiles[i] = GetProfileFor(m_objAddrs[i], GetKeyAsByteArray(), codec,
                                              additionalComponents);
            }
        }
Esempio n. 2
0
        /// <summary>parses the addr list</summary>
        private void ParseAddrList(string addrList, Codec codec,
                                   IList /* TaggedComponent */ additionalComponents) {
            if (addrList == null) {
                throw new BAD_PARAM(8, CompletionStatus.Completed_No);
            }
            string[] parts = addrList.Split(',');
            // at least one!
            m_objAddrs = new CorbaLocObjAddr[parts.Length];
            m_profiles = new IorProfile[parts.Length];

            for (int i = 0; i < parts.Length; i++) {
                if (CorbaLocIiopAddr.IsResponsibleForProtocol(parts[i])) {
                    m_objAddrs[i] = new CorbaLocIiopAddr(parts[i]);
                } else if (CorbaLocIiopSslAddr.IsResponsibleForProtocol(parts[i])) {
                    m_objAddrs[i] = new CorbaLocIiopSslAddr(parts[i]);
                } else {
                    throw new BAD_PARAM(8, CompletionStatus.Completed_No);
                }
                m_profiles[i] = GetProfileFor(m_objAddrs[i], GetKeyAsByteArray(), codec,
                                              additionalComponents);
            }
        }