예제 #1
0
 /// <summary>
 /// generates a setting with proxy enabled
 /// </summary>
 /// <param name="api_id">application api_id</param>
 /// <param name="api_hash">application api_hash</param>
 /// <param name="proxy">proxy information to use</param>
 /// <param name="name">determinants suffix name for cache folder</param>
 public ApiSetting(int api_id, string api_hash, ProxySetting proxy, string name) : this(api_id, api_hash, proxy)
 {
     // only words accepted
     this.name = Regex.Match(name, @"\w{1,1000}").Value;
 }
예제 #2
0
 /// <summary>
 /// generates a setting with proxy enabled
 /// </summary>
 /// <param name="api_id">application api_id</param>
 /// <param name="api_hash">application api_hash</param>
 /// <param name="proxy">proxy information to use</param>
 public ApiSetting(int api_id, string api_hash, ProxySetting proxy) : this(api_id, api_hash)
 {
     this.proxy = proxy;
 }