/// <summary>this will trigger the creation of an authenticating service</summary> public Service(string service, string applicationName) : base() { RequestFactory = new GDataGAuthRequestFactory(service, applicationName); _serviceID = service; InitVersionInformation(); }
/// <summary> /// if the service is using a Google Request Factory it will use that /// assuming credentials are set to retrieve the authentication token /// for those credentials /// /// Note that this only works for ClientLogin, not for any other type of authentication /// </summary> /// <returns>string</returns> public string QueryClientLoginToken() { if (Credentials != null) { GDataGAuthRequestFactory factory = _factory as GDataGAuthRequestFactory; if (factory != null) { return(factory.QueryAuthToken(Credentials)); } } return(null); }
/// <summary> /// if the service is using a Google Request Factory it will set the passed /// in token to the factory. NET CF does not support authsubtokens here /// </summary> /// <returns>string</returns> public void SetAuthenticationToken(string token) { GDataGAuthRequestFactory factory = _factory as GDataGAuthRequestFactory; if (factory != null) { factory.GAuthToken = token; } else { GAuthSubRequestFactory f = _factory as GAuthSubRequestFactory; if (f != null) { f.Token = token; } } }
////////////////////////////////////////////////////////////////////// /// <summary>default constructor</summary> ////////////////////////////////////////////////////////////////////// internal GDataLoggingRequest(GDataRequestType type, Uri uriTarget, GDataGAuthRequestFactory factory, string strInputFileName, string strOutputFileName, string strCombinedLogFileName) : base(type, uriTarget, factory) { _strInput = strInputFileName; _strOutput = strOutputFileName; _strCombined = strCombinedLogFileName; }
/// <summary>default constructor</summary> internal GDataGAuthRequest(GDataRequestType type, Uri uriTarget, GDataGAuthRequestFactory factory) : base(type, uriTarget, factory as GDataRequestFactory) { // need to remember the factory, so that we can pass the new authtoken back there if need be _factory = factory; }