Beispiel #1
0
 /// <summary>
 /// Preferred constructor.
 /// </summary>
 /// <param name="filePath"></param>
 public K2ProcessErrors(string filePath, k2Base.SCConnectionStringBuilder k2ConnectionStringBuilder, string errorProfileName)
     : base()
 {
     _filePath = filePath;
     _k2ConnectionStringBuilder = k2ConnectionStringBuilder;
     _errorProfileName          = errorProfileName;
 }
        /// <summary>
        /// Gets a k2 connection string.
        /// </summary>
        /// <param name="HostServerName">Name of the host server.</param>
        /// <param name="HostServerPortNum">The host server port num.</param>
        /// <param name="Domain">The domain.</param>
        /// <param name="UserID">The user ID.</param>
        /// <param name="Password">The password.</param>
        /// <returns>A K2 connection string</returns>
        public static string GetK2ConnectionString(
            string HostServerName, string HostServerPortNum,
            string Domain, string UserID, string Password)
        {
            SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder connBldrSmO =
                new SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder();

            connBldrSmO.Authenticate      = true;
            connBldrSmO.Host              = HostServerName;
            connBldrSmO.IsPrimaryLogin    = true;
            connBldrSmO.SecurityLabelName = "K2";
            connBldrSmO.Port              = Convert.ToUInt32(HostServerPortNum);
            connBldrSmO.Integrated        = true;

            if (!string.IsNullOrEmpty(Domain) &&
                !string.IsNullOrEmpty(UserID) &&
                !string.IsNullOrEmpty(Password))
            {
                connBldrSmO.UserID        = UserID;
                connBldrSmO.Password      = Password;
                connBldrSmO.WindowsDomain = Domain;
            }

            return(connBldrSmO.ToString());
        }
 private string GetSMOConnStr()
 {
     SCHC.SCConnectionStringBuilder connStr = new SCHC.SCConnectionStringBuilder();
     connStr.Host           = ConfigurationManager.AppSettings["HostName"];
     connStr.Port           = Convert.ToUInt32(ConfigurationManager.AppSettings["HostPort"]);
     connStr.Integrated     = true;
     connStr.IsPrimaryLogin = true;
     return(connStr.ConnectionString);
 }
        /// <summary>
        /// Gets the k2 connection string.
        /// </summary>
        /// <param name="HostServerName">Name of the host server.</param>
        /// <param name="HostServerPortNum">The host server port num.</param>
        /// <returns>A K2 connection string</returns>
        public static string GetK2ConnectionString(
            string HostServerName, string HostServerPortNum)
        {
            SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder connBldrSmO =
                new SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder();

            connBldrSmO.Authenticate      = true;
            connBldrSmO.Host              = HostServerName;
            connBldrSmO.IsPrimaryLogin    = true;
            connBldrSmO.SecurityLabelName = "K2";
            connBldrSmO.Port              = Convert.ToUInt32(HostServerPortNum);
            connBldrSmO.Integrated        = true;

            return(connBldrSmO.ToString());
        }
        /// <summary>
        /// Gets the k2 connection string.
        /// </summary>
        /// <param name="HostServerName">Name of the host server.</param>
        /// <param name="HostServerPortNum">The host server port num.</param>
        /// <returns>A K2 connection string</returns>
        public static string GetK2ConnectionString(
            string HostServerName, string HostServerPortNum)
        {
            SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder connBldrSmO =
                new SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder();

            connBldrSmO.Authenticate = true;
            connBldrSmO.Host = HostServerName;
            connBldrSmO.IsPrimaryLogin = true;
            connBldrSmO.SecurityLabelName = "K2";
            connBldrSmO.Port = Convert.ToUInt32(HostServerPortNum);
            connBldrSmO.Integrated = true;

            return connBldrSmO.ToString();
        }
        /// <summary>
        /// Gets a k2 connection string.
        /// </summary>
        /// <param name="HostServerName">Name of the host server.</param>
        /// <param name="HostServerPortNum">The host server port num.</param>
        /// <param name="Domain">The domain.</param>
        /// <param name="UserID">The user ID.</param>
        /// <param name="Password">The password.</param>
        /// <returns>A K2 connection string</returns>
        public static string GetK2ConnectionString(
            string HostServerName, string HostServerPortNum, 
            string Domain, string UserID, string Password)
        {
            SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder connBldrSmO =
                new SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder();

            connBldrSmO.Authenticate = true;
            connBldrSmO.Host = HostServerName;
            connBldrSmO.IsPrimaryLogin = true;
            connBldrSmO.SecurityLabelName = "K2";
            connBldrSmO.Port = Convert.ToUInt32(HostServerPortNum);
            connBldrSmO.Integrated = true;

            if (!string.IsNullOrEmpty(Domain) &&
                !string.IsNullOrEmpty(UserID) &&
                !string.IsNullOrEmpty(Password))
            {
                connBldrSmO.UserID = UserID;
                connBldrSmO.Password = Password;
                connBldrSmO.WindowsDomain = Domain;
            }

            return connBldrSmO.ToString();
        }