Exemplo n.º 1
0
		public static string ILincGetSessionFromUserID(string userId)
		{
			//the iLinc web service
			//j Could also get user pictures, first name, last name, email address, groups, divisions
			// as well as all activities and attendees, schedule, etc.
			TrumpITReporting.Web.iLincAPI.iLincAPI px = new TrumpITReporting.Web.iLincAPI.iLincAPI();
			GetSessionDataType gtype = new GetSessionDataType();
			//ActivityID ID string of an existing activity in the iLinc system (call to GetActivityID)
			//UserID ID string of an existing user in the iLinc system (call to GetUserID)
			//		Either ActivityID or UserID is required. Both are not.
			//StartDate Date/time string in format: mm/dd/yyyy (i.e. 03/23/2006)
			//EndDate Date/time string in format: mm/dd/yyyy (i.e. 03/23/2006)
			//TimeZone TimeZone string from the list of acceptable TimeZone values. Only needed if StartDate
			//		or EndDate present. If a TimeZone is not specified, the site’s time zone will be used.

			gtype.UserID = userId;
			//gtype.ActivityID = null;
			//gtype.StartDate = "01/01/2009"; // optional
			//gtype.EndDate = "12/31/2009"; // optional
			//gtype.TimeZone = "US/Eastern"; // If a TimeZone is not specified, the site’s time zone will be used
			GetSessionDataResponseType response = px.GetSessionData(_Auth, gtype);
			XmlSerializer serializer = new XmlSerializer(typeof(GetSessionDataResponseType));
			StringWriter xml = new StringWriter();
			serializer.Serialize(xml, response);
			// Remove all xmlns:* instances to simplify LINQ and xpath expressions
			string xmlResult = Regex.Replace(xml.ToString(), @"(xmlns:?[^=]*=[""][^""]*[""])", "", RegexOptions.IgnoreCase | RegexOptions.Multiline);
			return xmlResult;
		}
Exemplo n.º 2
0
		public static string ILincGetSessionFromActivityID(string activityID)
		{
			TrumpITReporting.Web.iLincAPI.iLincAPI px = new TrumpITReporting.Web.iLincAPI.iLincAPI();
			GetSessionDataType gtype = new GetSessionDataType();
			gtype.ActivityID = activityID;
			GetSessionDataResponseType response = px.GetSessionData(_Auth, gtype);
			XmlSerializer serializer = new XmlSerializer(typeof(GetSessionDataResponseType));
			StringWriter xml = new StringWriter();
			serializer.Serialize(xml, response);
			// Remove all xmlns:* instances to simplify LINQ and xpath expressions
			string xmlResult = Regex.Replace(xml.ToString(), @"(xmlns:?[^=]*=[""][^""]*[""])", "", RegexOptions.IgnoreCase | RegexOptions.Multiline);
			return xmlResult;
		}
Exemplo n.º 3
0
 /// <remarks/>
 public void GetSessionDataAsync(AuthorizationType Authorization, GetSessionDataType parameters) {
     this.GetSessionDataAsync(Authorization, parameters, null);
 }
Exemplo n.º 4
0
 /// <remarks/>
 public void GetSessionDataAsync(AuthorizationType Authorization, GetSessionDataType parameters, object userState) {
     if ((this.GetSessionDataOperationCompleted == null)) {
         this.GetSessionDataOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSessionDataOperationCompleted);
     }
     this.InvokeAsync("GetSessionData", new object[] {
                 Authorization,
                 parameters}, this.GetSessionDataOperationCompleted, userState);
 }
Exemplo n.º 5
0
 public GetSessionDataResponseType GetSessionData(AuthorizationType Authorization, GetSessionDataType parameters) {
     object[] results = this.Invoke("GetSessionData", new object[] {
                 Authorization,
                 parameters});
     return ((GetSessionDataResponseType)(results[0]));
 }