Beispiel #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 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);
 }
Beispiel #2
0
        /// <summary>
        /// Instantiates the Service
        /// </summary>
        public OAuth2()
        {
            userAgentComplete = userAgentFSAPI;// +";" + this.contributorRef;

            client         = new Net.SuperWebClient();
            client.Headers = new System.Net.WebHeaderCollection();
            client.Headers.Add("Content-Type", contentType);
            client.UploadStringCompleted += new UploadStringCompletedEventHandler(client_UploadStringCompleted);
        }
Beispiel #3
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);
 }
Beispiel #4
0
        /// <summary>
        /// Instantiates the Service
        /// </summary>
        public OAuth2()
        {
            userAgentComplete = userAgentFSAPI;// +";" + this.contributorRef;

            client = new Net.SuperWebClient();
            client.Headers = new System.Net.WebHeaderCollection();
            client.Headers.Add("Content-Type", contentType);
            client.UploadStringCompleted += new UploadStringCompletedEventHandler(client_UploadStringCompleted);
        }
Beispiel #5
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);
 }
Beispiel #6
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);
 }