Пример #1
0
 /// <summary>
 /// Instantiates the Service
 /// </summary>
 /// <param name="userAgent">Name of the application and version that is accessing FamilySearch. Use this format:  "MyApp/v1.0"</param>
 /// <param name="server">Indicate which server to use to process all API requests</param>
 public BasicAuth(string userAgent, FSServer server)
 {
     this.UserAgent = userAgent; 
     this.Server = server;
     client.UserAgent = userAgentComplete;
     client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
 }
Пример #2
0
 /// <summary>
 /// Instantiates the Service
 /// </summary>
 /// <param name="userAgent">Name of the application and version that is accessing FamilySearch. Use this format:  "MyApp/v1.0"</param>
 /// <param name="server">Indicate which server to use to process all API requests</param>
 public BasicAuth(string userAgent, FSServer server)
 {
     this.UserAgent   = userAgent;
     this.Server      = server;
     client.UserAgent = userAgentComplete;
     client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
 }
Пример #3
0
        //Gets or Sets which server to use to process all API requests


        /// <summary>
        /// Instantiates the Service and sets the Cookies to use for Authenticated requests to FamilySearch
        /// </summary>
        /// <param name="cookies">Collection of cookies to use for authenticated requests to FamilySearch.</param>
        /// <param name="userAgent">Name of the application and version that is accessing FamilySearch. Use this format:  "MyApp/v1.0"</param>
        /// <param name="server">Indicate which server to use to process all API requests</param>
        public BasicAuth(CookieContainer cookies, string userAgent, FSServer server)
        {
            this.cookies     = cookies;
            this.UserAgent   = userAgent; //intentionally using the Public version of this.UserAgent
            this.Server      = server;
            client.UserAgent = userAgentComplete;
            client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
        }
Пример #4
0
 /// <summary>
 /// Instantiates the Service and sets the SessionId to use for Authenticated requests to FamilySearch
 /// </summary>
 /// <param name="accessToken">AccessToken to use for authenticated requests to FamilySearch.</param>
 /// <param name="userAgent">Name of the application and version that is accessing FamilySearch. Use this format:  "MyApp/v1.0"</param>
 /// <param name="server">Indicate which server to use to process all API requests</param>
 public BasicAuth(string accessToken, string userAgent, FSServer server)
 {
     this.AccessToken = accessToken;
     this.userAgent   = userAgent;
     this.UserAgent   = userAgent; //intentionally using the Public version of this.UserAgent
     this.Server      = server;    //intentionally using the Public version of this.Mode
     client.UserAgent = userAgentComplete;
     client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
 }
Пример #5
0
 /// <summary>
 /// Instantiates the Service
 /// </summary>
 /// <param name="userAgent">Name of the application and version that is accessing FamilySearch. Use this format:  "MyApp/v1.0"</param>
 /// <param name="server">Indicate which server to use to process all API requests</param>
 public OAuth2(string userAgent, FSServer server)
 {
     this.UserAgent = userAgent;
     this.Server    = server;
     client         = new Net.SuperWebClient();
     client.Headers = new System.Net.WebHeaderCollection();
     client.Headers.Add("Content-Type", contentType);
     client.UploadStringCompleted += new UploadStringCompletedEventHandler(client_UploadStringCompleted);
 }
Пример #6
0
 /// <summary>
 /// Instantiates the Service
 /// </summary>
 /// <param name="userAgent">Name of the application and version that is accessing FamilySearch. Use this format:  "MyApp/v1.0"</param>
 /// <param name="server">Indicate which server to use to process all API requests</param>
 public OAuth2(string userAgent, FSServer server)
 {
     this.UserAgent = userAgent; 
     this.Server = server;
     client = new Net.SuperWebClient();
     client.Headers = new System.Net.WebHeaderCollection();
     client.Headers.Add("Content-Type", contentType);
     client.UploadStringCompleted += new UploadStringCompletedEventHandler(client_UploadStringCompleted);
 }
Пример #7
0
 //public ApiServer( ICallService callService, IFSService fsService, IGatewayService gatewayService)
 public ApiServer()
 {
     //_fsService = fsService;
     //_callService = callService;
     //_gatewayService = gatewayService;
     _fsService   = new FSService();
     _callService = new CallService();
     FS           = _fsService.GetFSServer();
     fsInbound    = new FSInbound(FS.Host, FS.Port, FS.Password, FS.OutAddress);
     _run         = true;
 }
Пример #8
0
 /// <summary>
 /// Instantiates the Service and sets the SessionId to use for Authenticated requests to FamilySearch
 /// </summary>
 /// <param name="accessToken">AccessToken to use for authenticated requests to FamilySearch.</param>
 /// <param name="userAgent">Name of the application and version that is accessing FamilySearch. Use this format:  "MyApp/v1.0"</param>
 /// <param name="server">Indicate which server to use to process all API requests</param>
 public OAuth2(string accessToken, string userAgent, FSServer server)
 {
     this.AccessToken = accessToken;
     this.userAgent   = userAgent;
     this.UserAgent   = userAgent; //intentionally using the Public version of this.UserAgent
     this.Server      = server;
     client           = new Net.SuperWebClient();
     client.Headers   = new System.Net.WebHeaderCollection();
     client.Headers.Add("Content-Type", contentType);
     client.UploadStringCompleted += new UploadStringCompletedEventHandler(client_UploadStringCompleted);
 }
Пример #9
0
 /// <summary>
 /// Instantiates the Service and sets the SessionId to use for Authenticated requests to FamilySearch
 /// </summary>
 /// <param name="accessToken">AccessToken to use for authenticated requests to FamilySearch.</param>
 /// <param name="userAgent">Name of the application and version that is accessing FamilySearch. Use this format:  "MyApp/v1.0"</param>
 /// <param name="server">Indicate which server to use to process all API requests</param>
 public OAuth2(string accessToken, string userAgent, FSServer server)
 {
     this.AccessToken = accessToken;
     this.userAgent = userAgent;
     this.UserAgent = userAgent; //intentionally using the Public version of this.UserAgent
     this.Server = server;
     client = new Net.SuperWebClient();
     client.Headers = new System.Net.WebHeaderCollection();
     client.Headers.Add("Content-Type", contentType);
     client.UploadStringCompleted += new UploadStringCompletedEventHandler(client_UploadStringCompleted);
 }
Пример #10
0
        //Gets or Sets which server to use to process all API requests


        /// <summary>
        /// Instantiates the Service and sets the Cookies to use for Authenticated requests to FamilySearch
        /// </summary>
        /// <param name="cookies">Collection of cookies to use for authenticated requests to FamilySearch.</param>
        /// <param name="userAgent">Name of the application and version that is accessing FamilySearch. Use this format:  "MyApp/v1.0"</param>
        /// <param name="server">Indicate which server to use to process all API requests</param>
        public BasicAuth(CookieContainer cookies, string userAgent, FSServer server)
        {
            this.cookies = cookies;
            this.UserAgent = userAgent; //intentionally using the Public version of this.UserAgent
            this.Server = server;  
            client.UserAgent = userAgentComplete;
            client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
        }
Пример #11
0
 /// <summary>
 /// Instantiates the Service and sets the SessionId to use for Authenticated requests to FamilySearch
 /// </summary>
 /// <param name="accessToken">AccessToken to use for authenticated requests to FamilySearch.</param>
 /// <param name="userAgent">Name of the application and version that is accessing FamilySearch. Use this format:  "MyApp/v1.0"</param>
 /// <param name="server">Indicate which server to use to process all API requests</param>
 public BasicAuth(string accessToken, string userAgent, FSServer server)
 {
     this.AccessToken = accessToken;
     this.userAgent = userAgent;
     this.UserAgent = userAgent; //intentionally using the Public version of this.UserAgent
     this.Server = server;  //intentionally using the Public version of this.Mode
     client.UserAgent = userAgentComplete;
     client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
 }