Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="stations"></param>
 /// <param name="scp"></param>
 internal static bool Bind(StationCollection stations, SocketCommuniPort scp)
 {
     foreach (Station st in stations)
     {
         if (scp.Match(st.CommuniType))
         {
             ClearBind(st);
             return(Bind(st, scp));
         }
     }
     return(false);
 }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="stations"></param>
        /// <param name="cp"></param>
        static internal bool Bind(StationCollection stations, CommuniPort cp)
        {
            if (stations == null)
            {
                throw new ArgumentNullException("stations");
            }

            if (cp == null)
            {
                throw new ArgumentNullException("cp");
            }

            if (cp is SocketCommuniPort)
            {
                return(Bind(stations, cp as SocketCommuniPort));
            }
            return(false);
        }