BlogEngine.Core.Providers.DbBlogProvider.LoadPingServices C# (CSharp) Method

LoadPingServices() public method

Gets the PingServices from the database
public LoadPingServices ( ) : StringCollection
return System.Collections.Specialized.StringCollection
        public override StringCollection LoadPingServices()
        {
            var col = new StringCollection();

            using (var conn = this.CreateConnection())
            {
                if (conn.HasConnection)
                {
                    using (var cmd = conn.CreateTextCommand(string.Format("SELECT Link FROM {0}PingService WHERE BlogID = {1}blogid ", this.tablePrefix, this.parmPrefix)))
                    {
                        cmd.Parameters.Add(conn.CreateParameter(FormatParamName("blogid"), Blog.CurrentInstance.Id.ToString()));

                        using (var rdr = cmd.ExecuteReader())
                        {
                            while (rdr.Read())
                            {
                                if (!col.Contains(rdr.GetString(0)))
                                {
                                    col.Add(rdr.GetString(0));
                                }
                            }
                        }
                    }
                }
            }

            return col;
        }