예제 #1
0
 /// <summary>
 /// Initializes a new instance of the ToTangoExport class.
 /// </summary>
 /// <param name="token">Your ToTango API authentication key.</param>
 /// <param name="headerFile">Your Mapping file.</param>
 /// <param name="sqlConString">Optional SQL connection string</param>
 public ToTangoExport(string token, string headerFile, string sqlConString = "")
 {
     this._token  = token;
     this._sqlLog = new sql(sqlConString);
     foreach (string line in File.ReadAllLines(headerFile))
     {
         if ((line.Trim().Length > 0) && (!line.StartsWith("#")))
         {
             if (this._headers == "")
             {
                 this._headers   = line.Replace("\t", "");
                 this._headArr   = this._headers.Split(',');
                 this._aliasHead = this._headers;
             }
             else
             {
                 this._aliasHead = line.Replace("\t", "");
                 break;
             }
         }
     }
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the ToTangoExport class.
 /// </summary>
 /// <param name="token">Your ToTango API authentication key.</param>
 /// <param name="headerFile">Your Mapping file.</param>
 /// <param name="sqlConString">Optional SQL connection string</param>
 public ToTangoExport(string token, string headerFile, string sqlConString = "")
 {
     this._token = token;
     this._sqlLog = new sql(sqlConString);
     foreach (string line in File.ReadAllLines(headerFile))
     {
         if ((line.Trim().Length > 0) && (!line.StartsWith("#")))
         {
             if (this._headers == "")
             {
                 this._headers = line.Replace("\t", "");
                 this._headArr = this._headers.Split(',');
                 this._aliasHead = this._headers;
             }
             else
             {
                 this._aliasHead = line.Replace("\t", "");
                 break;
             }
         }
     }
 }