示例#1
0
        public IConnection GetConnection()
        {
            var nextNode = GetNodeInternal();

            if (nextNode == null)
            {
                throw new HeliosConnectionException(ExceptionType.NotSupported, "No available nodes.");
            }
            if (HasConnectionForNode(nextNode))
            {
                return(GetExistingConnectionForNode(nextNode));
            }
            return(ConnectionBuilder.BuildConnection(nextNode));
        }
示例#2
0
 protected SqlConnection BuildConnection()
 {
     return(ConnectionBuilder.BuildConnection(ConnectionProperties));
 }
示例#3
0
 public static IConnection GetConnection(this INode node)
 {
     return(DefaultConnectionBuilder.BuildConnection(node));
 }