Beispiel #1
0
        public static webObject editFriendCollection(FriendCollection aFriendCollection)
        {
            FanToken vFanToken = ServerSession.GetFanToken(HttpContext.Current.Session);

            ServerSession.ClearSessionBusiness(HttpContext.Current.Session);
            webObject vWebObject = new webObject();

            vWebObject.aTransactionStatus = ServerSession.GetTransactionStatus(HttpContext.Current.Session);

            try
            {
                FanServiceConsumer.SaveFriend(vFanToken, aFriendCollection);
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.OK;
                vWebObject.aTransactionStatus.Message           = "FriendCollection Edited";
                ServerSession.SetTransactionStatus(HttpContext.Current.Session, vWebObject.aTransactionStatus);
                vWebObject.AnObject = aFriendCollection;
            }
            catch (TransactionStatusException tx)
            {
                vWebObject.aTransactionStatus.AssignFromSource(tx.TransactionStatus);
                return(vWebObject);
            }
            catch (Exception ex)
            {
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.GeneralException;
                vWebObject.aTransactionStatus.Message           = "Edit of FriendCollection unsuccesful" + ex.Message;
                vWebObject.aTransactionStatus.InnerMessage      = ex.InnerException == null ? String.Empty : ex.InnerException.Message;
                return(vWebObject);
            }
            return(vWebObject);
        }
Beispiel #2
0
 /// <summary>
 ///   Delegates the method.
 /// </summary>
 /// <param name="aXmlCredentials">The XMLCredentials <see cref="string"/>.</param>
 /// <param name="aXmlArgument">The XMLArgument <see cref="string"/>.</param>
 /// <returns>
 ///   Concatenated XML <see cref="string"/>.
 /// </returns>
 public static string Invoke(string aXmlCredentials, string aXmlArgument)
 {
     try
     {
         FanToken vFanToken = new FanToken();
         // Deserialize the 1st argument (aXmlCredentials) from an XML string into a UserToken
         vFanToken = XmlUtils.Deserialize <FanToken>(aXmlCredentials);
         // Deserialize the data access file into a Session
         Connection.Instance = FileUtils.Deserialize <Connection>(HttpContext.Current.Server.MapPath("~/bin/zfit.connection.dat"));
         // Invoke the method named in UserToken.Instance.Method, passing a UserKey as the 1st argument and the 2nd argument (aXmlArgument) unchanged
         object[] vArgArray   = new object[] { InitializeSession(vFanToken), aXmlArgument };
         var      vMethodInfo = typeof(FanImplementation).GetMethod(vFanToken.Method);
         if (vMethodInfo == null)
         {
             throw new Exception(string.Format("Webservice Method not found: \"{0}\".", vFanToken.Method));
         }
         //
         // This is where the method passed in FanToken is actually invoked
         //
         string vXml = (string)vMethodInfo.Invoke(null, vArgArray);
         //
         //
         //
         return(XmlUtils.Concatenate(TransactionSuccess(), vXml, "xml"));
     }
     catch (ZpAccessException ax)
     {
         return(XmlUtils.Concatenate(TransactionAccessException(ax), null, "xml"));
     }
     catch (Exception ex)
     {
         return(XmlUtils.Concatenate(TransactionException(ex), null, "xml"));
     }
 }
Beispiel #3
0
        public static webObject loadFanSessionCollection(FanSessionCollection aFanSessionCollection)
        {
            FanToken vFanToken = ServerSession.GetFanToken(HttpContext.Current.Session);
            FanKey   vFanKey   = ServerSession.GetObject <FanKey>(HttpContext.Current.Session);

            aFanSessionCollection.FanSessionFilter.FssFilter.FanKey = vFanKey.FannKey;
            webObject vWebObject = new webObject();

            vWebObject.aTransactionStatus = ServerSession.GetTransactionStatus(HttpContext.Current.Session);

            try
            {
                FanServiceConsumer.GetFanSessionCollection(vFanToken, aFanSessionCollection);
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.OK;
                vWebObject.aTransactionStatus.Message           = "FanSessionCollection Loaded";
                ServerSession.SetTransactionStatus(HttpContext.Current.Session, vWebObject.aTransactionStatus);
                vWebObject.AnObject = aFanSessionCollection;
            }
            catch (TransactionStatusException tx)
            {
                vWebObject.aTransactionStatus.AssignFromSource(tx.TransactionStatus);
                return(vWebObject);
            }
            catch (Exception ex)
            {
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.GeneralException;
                vWebObject.aTransactionStatus.Message           = "Load of FanSessionCollection unsuccesful" + ex.Message;
                vWebObject.aTransactionStatus.InnerMessage      = ex.InnerException == null ? String.Empty : ex.InnerException.Message;
                return(vWebObject);
            }
            return(vWebObject);
        }
Beispiel #4
0
        public static webObject loadExercise(Exercise aExercise)
        {
            FanToken  vFanToken  = ServerSession.GetFanToken(HttpContext.Current.Session);
            webObject vWebObject = new webObject();

            vWebObject.aTransactionStatus = ServerSession.GetTransactionStatus(HttpContext.Current.Session);

            try
            {
                FanServiceConsumer.GetExercise(vFanToken, aExercise);
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.OK;
                vWebObject.aTransactionStatus.Message           = "Exercise Loaded";
                ServerSession.SetTransactionStatus(HttpContext.Current.Session, vWebObject.aTransactionStatus);
                vWebObject.AnObject = aExercise;
            }
            catch (TransactionStatusException tx)
            {
                vWebObject.aTransactionStatus.AssignFromSource(tx.TransactionStatus);
                return(vWebObject);
            }
            catch (Exception ex)
            {
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.GeneralException;
                vWebObject.aTransactionStatus.Message           = "Load of Exercise unsuccesful" + ex.Message;
                vWebObject.aTransactionStatus.InnerMessage      = ex.InnerException == null ? String.Empty : ex.InnerException.Message;
                return(vWebObject);
            }
            return(vWebObject);
        }
Beispiel #5
0
        public static webObject loadActivityCollection(Activity aActivity)
        {
            ActivityCollection vActivityCollection = new ActivityCollection();

            vActivityCollection.ActivityFilter.ActFilter.AssignFromSource(aActivity);

            FanToken  vFanToken  = ServerSession.GetFanToken(HttpContext.Current.Session);
            webObject vWebObject = new webObject();

            vWebObject.aTransactionStatus = ServerSession.GetTransactionStatus(HttpContext.Current.Session);

            try
            {
                FanServiceConsumer.GetActivityCollection(vFanToken, vActivityCollection);
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.OK;
                vWebObject.aTransactionStatus.Message           = "ActivityCollection Loaded";
                ServerSession.SetTransactionStatus(HttpContext.Current.Session, vWebObject.aTransactionStatus);
                vWebObject.AnObject = vActivityCollection;
            }
            catch (TransactionStatusException tx)
            {
                vWebObject.aTransactionStatus.AssignFromSource(tx.TransactionStatus);
                return(vWebObject);
            }
            catch (Exception ex)
            {
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.GeneralException;
                vWebObject.aTransactionStatus.Message           = "Load of ActivityCollection unsuccesful" + ex.Message;
                vWebObject.aTransactionStatus.InnerMessage      = ex.InnerException == null ? String.Empty : ex.InnerException.Message;
                return(vWebObject);
            }
            return(vWebObject);
        }
Beispiel #6
0
        public static webObject deleteActivity(Activity aActivity)
        {
            FanToken  vFanToken  = ServerSession.GetFanToken(HttpContext.Current.Session);
            webObject vWebObject = new webObject();

            vWebObject.aTransactionStatus = ServerSession.GetTransactionStatus(HttpContext.Current.Session);

            try
            {
                FanServiceConsumer.DeleteActivity(vFanToken, aActivity);
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.OK;
                vWebObject.aTransactionStatus.Message           = "Activity Deleted";
                ServerSession.SetTransactionStatus(HttpContext.Current.Session, vWebObject.aTransactionStatus);
                vWebObject.AnObject = aActivity;
            }
            catch (TransactionStatusException tx)
            {
                vWebObject.aTransactionStatus.AssignFromSource(tx.TransactionStatus);
                return(vWebObject);
            }
            catch (Exception ex)
            {
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.GeneralException;
                vWebObject.aTransactionStatus.Message           = "Deletion of Activity unsuccesful" + ex.Message;
                vWebObject.aTransactionStatus.InnerMessage      = ex.InnerException == null ? String.Empty : ex.InnerException.Message;
                return(vWebObject);
            }
            return(vWebObject);
        }
Beispiel #7
0
        public static webObject editWorkout(Workout aWorkout)
        {
            FanToken  vFanToken  = ServerSession.GetFanToken(HttpContext.Current.Session);
            webObject vWebObject = new webObject();

            vWebObject.aTransactionStatus = ServerSession.GetTransactionStatus(HttpContext.Current.Session);

            try
            {
                FanServiceConsumer.EditWorkout(vFanToken, aWorkout);
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.OK;
                vWebObject.aTransactionStatus.Message           = "Workout Edited";
                ServerSession.SetTransactionStatus(HttpContext.Current.Session, vWebObject.aTransactionStatus);
                vWebObject.AnObject = aWorkout;
            }
            catch (TransactionStatusException tx)
            {
                vWebObject.aTransactionStatus.AssignFromSource(tx.TransactionStatus);
                return(vWebObject);
            }
            catch (Exception ex)
            {
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.GeneralException;
                vWebObject.aTransactionStatus.Message           = "Edit of Workout unsuccesful" + ex.Message;
                vWebObject.aTransactionStatus.InnerMessage      = ex.InnerException == null ? String.Empty : ex.InnerException.Message;
                return(vWebObject);
            }
            return(vWebObject);
        }
Beispiel #8
0
        public static webObject editFan(Fan aFan)
        {
            FanToken vFanToken = ServerSession.GetFanToken(HttpContext.Current.Session);
            FanKey   vFanKey   = ServerSession.GetObject <FanKey>(HttpContext.Current.Session);

            aFan.FannKey = vFanKey.FannKey;

            ServerSession.ClearSessionBusiness(HttpContext.Current.Session);
            ServerSession.PutObject <FanKey>(HttpContext.Current.Session, vFanKey); // Review this element of pattern
            webObject vWebObject = new webObject();

            vWebObject.aTransactionStatus = ServerSession.GetTransactionStatus(HttpContext.Current.Session);
            try
            {
                FanServiceConsumer.EditFan(vFanToken, aFan);
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.OK;
                vWebObject.aTransactionStatus.Message           = "Fan Edited";
                ServerSession.SetTransactionStatus(HttpContext.Current.Session, vWebObject.aTransactionStatus);
                vWebObject.AnObject = aFan;
            }
            catch (TransactionStatusException tx)
            {
                vWebObject.aTransactionStatus.AssignFromSource(tx.TransactionStatus);
                return(vWebObject);
            }
            catch (Exception ex)
            {
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.GeneralException;
                vWebObject.aTransactionStatus.Message           = "Edit of Fan unsuccesful" + ex.Message;
                vWebObject.aTransactionStatus.InnerMessage      = ex.InnerException == null ? String.Empty : ex.InnerException.Message;
                return(vWebObject);
            }
            return(vWebObject);
        }
Beispiel #9
0
        public static TransactionStatus fanRegister(Fan aFan)
        {
            ServerSession.ClearSessionBusiness(HttpContext.Current.Session);
            TransactionStatus vTransactionStatus = ServerSession.GetTransactionStatus(HttpContext.Current.Session);

            try
            {
                FanToken aFanToken = new FanToken();
                aFanToken.FanID    = "Register";
                aFanToken.Password = "******";
                aFanToken.Url      = "http://localhost/zfitsoap/zfitService.asmx";
                aFan.FanName       = "new";
                aFan.FanSurname    = "fanatic";
                FanServiceConsumer.AddFan(aFanToken, aFan);
                vTransactionStatus.TransactionResult = TransactionResult.OK;
                vTransactionStatus.Message           = "You have been succesfully registered!";
                vTransactionStatus.TargetUrl         = "/fandashboard.aspx";
                ServerSession.SetTransactionStatus(HttpContext.Current.Session, vTransactionStatus);
            }
            catch (TransactionStatusException tx)
            {
                vTransactionStatus.AssignFromSource(tx.TransactionStatus);
                return(vTransactionStatus);
            }
            catch (Exception ex)
            {
                vTransactionStatus.TransactionResult = TransactionResult.GeneralException;
                vTransactionStatus.Message           = ex.Message;
                vTransactionStatus.InnerMessage      = ex.InnerException == null ? String.Empty : ex.InnerException.Message;
                return(vTransactionStatus);
            }

            return(vTransactionStatus);
        }
Beispiel #10
0
        /// <summary>
        /// Logon to zfit via a call to FanServiceConsumer, save the connected Fan and FanToken to HttpSessionState.
        /// </summary>
        /// <param name="aHttpSessionState">An HttpSessionState from the calling page.</param>
        /// <param name="aFan">A zfit.Fan.</param>
        public static void Logon(HttpSessionState aHttpSessionState, Fan aFan)
        {
            //
            // Create a FanToken, populate with logon and Settings values
            //
            FanToken vFanToken = new FanToken()
            {
                FanID    = aFan.FanUserID,
                Password = aFan.FanPassword,
                Url      = "http://localhost/zfitsoap/zfitService.asmx"
            };

            //
            // Get a Fan by ID
            //
            FanServiceConsumer.GetFanByID(vFanToken, aFan);
            // Fully populate the FanToken and save it to Session
            vFanToken.Context = ConnectionContext.Browse;
            vFanToken.Version = "web";
            aHttpSessionState[sessionFanToken] = vFanToken;
            //
            // Save the Fan to the Session
            //
            aHttpSessionState[sessionFan] = aFan;
        }
Beispiel #11
0
        public static webObject addCell(Cell aCell)
        {
            FanToken vFanToken = ServerSession.GetFanToken(HttpContext.Current.Session);

            ServerSession.ClearSessionBusiness(HttpContext.Current.Session);
            webObject vWebObject = new webObject();

            vWebObject.aTransactionStatus = ServerSession.GetTransactionStatus(HttpContext.Current.Session);

            try
            {
                FanServiceConsumer.AddCell(vFanToken, aCell);
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.OK;
                vWebObject.aTransactionStatus.Message           = "Cell Added";
                ServerSession.SetTransactionStatus(HttpContext.Current.Session, vWebObject.aTransactionStatus);
                vWebObject.AnObject = aCell;
            }
            catch (TransactionStatusException tx)
            {
                vWebObject.aTransactionStatus.AssignFromSource(tx.TransactionStatus);
                return(vWebObject);
            }
            catch (Exception ex)
            {
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.GeneralException;
                vWebObject.aTransactionStatus.Message           = "Addition of Cell unsuccesful" + ex.Message;
                vWebObject.aTransactionStatus.InnerMessage      = ex.InnerException == null ? String.Empty : ex.InnerException.Message;
                return(vWebObject);
            }
            return(vWebObject);
        }
Beispiel #12
0
        /// <summary>
        /// The ServiceCall method of the ServiceCallHandler class is the generic handler for all calls to the
        /// Smart web service. It serializes a FanToken as XML Argument 1, a Smart Object as XML Argument 2 and
        /// invokes a remote member (Z2ZCall) located at a remote host (WebService).
        /// </summary>
        /// <typeparam name="T">The Type of the aObject that is passed as the second parameter to this method.</typeparam>
        /// <param name="aFanToken">A user token.</param>
        /// <param name="aMethod">The name of the WebMethod that must be called.</param>
        /// <param name="aObject">The business object that must be serialized and passed as an XML argument to the WebMethod.</param>
        ///
        public static void ServiceCall <T>(FanToken aFanToken, string aMethod, Zephob aObject)
        {
            var vTransactionStatus = new TransactionStatus();
            var vXDocument         = new XDocument();

            try
            {
                // Serialize the FanToken singleton instance to XML
                aFanToken.Method = aMethod;
                string vXmlFanToken = XmlUtils.Serialize <FanToken>(aFanToken, false);
                // Serialize the Zephob instance aObject (of type <T>) to XML
                string vXmlArgument = XmlUtils.Serialize <T>(aObject, false);

                // Invoke the ServiceHost (WebService) method "Z2ZCall"
                var vRemoteHost = new ServiceHost(aFanToken.Url);
                System.Net.ServicePointManager.Expect100Continue = false;
                string vXml = vRemoteHost.WebService.zfitFanCall(vXmlFanToken, vXmlArgument);

                // Convert (Deserialize) the "TransactionStatus" XML tag and subordinate tags to an object instance of type TransactionStatus
                vXDocument         = XDocument.Parse(vXml);
                vTransactionStatus = XmlUtils.Deserialize <TransactionStatus>(String.Join(null, vXDocument.Descendants("TransactionStatus").ToList()));
                //vTransactionStatus.TransactionResult = TransactionResult.OK;
            }
            catch (ZpAccessException ax)
            {
                vTransactionStatus.TransactionResult = TransactionResult.AccessException;
                vTransactionStatus.SourceAssembly    = SourceAssembly.Business;
                vTransactionStatus.Message           = ax.Message;
            }
            catch (Exception ex)
            {
                vTransactionStatus.TransactionResult = TransactionResult.GeneralException;
                vTransactionStatus.SourceAssembly    = SourceAssembly.Consumers;
                vTransactionStatus.Message           = ex.Message;
                var vStringBuilder = new StringBuilder();
                vStringBuilder.AppendLine(ex.StackTrace);
                if (ex.InnerException != null)
                {
                    vStringBuilder.AppendLine("");
                    vStringBuilder.AppendLine("+++++++ Inner Exception +++++++");
                    vStringBuilder.AppendLine(ex.InnerException.Message);
                    vStringBuilder.AppendLine(ex.InnerException.StackTrace);
                }
                vTransactionStatus.InnerMessage = vStringBuilder.ToString();
            }
            finally
            {
                if (vTransactionStatus.TransactionResult == TransactionResult.OK)
                {
                    var vObjectXml = String.Join(null, vXDocument.Descendants(typeof(T).Name).ToList());
                    aObject.AssignFromSource(XmlUtils.Deserialize <T>(vObjectXml));
                }
                else
                {
                    throw new TransactionStatusException(vTransactionStatus);
                }
            }
        }
Beispiel #13
0
        //The following body of code is commented out as this is a public system. Once Admin interface is built
        //we will return to a regular broadcast.

        /// <summary>
        /// Initializes the session with the Session token file located
        /// </summary>
        /// <returns></returns>
        //private static UserKey InitializeSession(UserToken aUserToken)
        //{
        //    var vUserKey = new UserKey();

        //    //The following body of code is commented out as this is a public system. Once PublicInterface is built
        //    //we will return to a regular broadcast.

        //    var vUser = new User() { UsrID = aUserToken.UserID };
        //    UserBusiness.LoadByID(vUserKey, vUser);
        //    if (String.Compare(vUser.UsrPassword, aUserToken.Password, false) != 0)
        //    {
        //        throw new Exception("User Authentication Exception");
        //    }
        //    vUserKey.UsrKey = vUser.UsrKey;

        //    return vUserKey;
        //}

        // ***********************

        // Overload for InitializeSession to accommodate FanKey as opposed to UserKey...
        /// <summary>
        /// Initializes the session with the Session token file located
        /// </summary>
        /// <returns></returns>
        private static FanKey InitializeSession(FanToken aFanToken)
        {
            var vFanKey = new FanKey();

            var vFan = new Fan()
            {
                FanID = aFanToken.FanID
            };

            FanBusiness.LoadByID(vFanKey, vFan);
            if (String.Compare(vFan.FanPassword, aFanToken.Password, false) != 0)
            {
                throw new Exception("User Authentication Exception");
            }
            vFanKey.FannKey = vFan.FannKey;

            return(vFanKey);
        }
Beispiel #14
0
        public static webObject editFanFedCollection(FanFedCollection aFanFedCollection)
        {
            FanToken vFanToken = ServerSession.GetFanToken(HttpContext.Current.Session);

            ServerSession.ClearSessionBusiness(HttpContext.Current.Session);
            webObject vWebObject = new webObject();

            vWebObject.aTransactionStatus = ServerSession.GetTransactionStatus(HttpContext.Current.Session);

            // ********** TEMPORARY REMEDY UNTIL I SORT OUT DATETIME ISSUE
            foreach (FanFed vCF in aFanFedCollection.FanFedList)
            {
                vCF.FanFedDateJoined = DateTime.Now;
            }

            try
            {
                FanServiceConsumer.SaveFanFed(vFanToken, aFanFedCollection);
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.OK;
                vWebObject.aTransactionStatus.Message           = "FanFedCollection Edited";
                ServerSession.SetTransactionStatus(HttpContext.Current.Session, vWebObject.aTransactionStatus);
                vWebObject.AnObject = aFanFedCollection;
            }
            catch (TransactionStatusException tx)
            {
                vWebObject.aTransactionStatus.AssignFromSource(tx.TransactionStatus);
                return(vWebObject);
            }
            catch (Exception ex)
            {
                vWebObject.aTransactionStatus.TransactionResult = TransactionResult.GeneralException;
                vWebObject.aTransactionStatus.Message           = "Edit of FanFedCollection unsuccesful" + ex.Message;
                vWebObject.aTransactionStatus.InnerMessage      = ex.InnerException == null ? String.Empty : ex.InnerException.Message;
                return(vWebObject);
            }
            return(vWebObject);
        }
Beispiel #15
0
 /// <summary>
 /// Add a <see cref="Friend" />.
 /// </summary>
 /// <param name="aFanToken">A <see cref="FanToken" /> object used for Access Control.</param>
 /// <param name="aFriendCollection">A provider suburb collection.</param>
 public static void SaveFriend(FanToken aFanToken, FriendCollection aFriendCollection)
 {
     FanCallHandler.ServiceCall <FriendCollection>(aFanToken, "SaveFriend", aFriendCollection);
 }
Beispiel #16
0
 /// <summary>
 /// Add a <see cref="FanSessionActivity" />.
 /// </summary>
 /// <param name="aFanToken">A <see cref="FanToken" /> object used for Access Control.</param>
 /// <param name="aFanSessionActivityCollection">A provider suburb collection.</param>
 public static void SaveFanSessionActivity(FanToken aFanToken, FanSessionActivityCollection aFanSessionActivityCollection)
 {
     FanCallHandler.ServiceCall <FanSessionActivityCollection>(aFanToken, "SaveFanSessionActivity", aFanSessionActivityCollection);
 }
Beispiel #17
0
        /// <summary>
        ///   Get a specified <see cref="RoleFunctionEditor"/>.
        /// </summary>
        /// <param name="aRoleFunctionEditor">A <see cref="RoleFunctionEditor"/> object.</param>
        /// <param name="aFanToken">A fantoken.</param>
        //public static void GetRoleFunctionEditor(FanToken aFanToken, RoleFunctionEditor aRoleFunctionEditor)
        //{
        //    FanCallHandler.ServiceCall<RoleFunctionEditor>(aFanToken, "GetRoleFunctionEditor", aRoleFunctionEditor);
        //}

        /// <summary>
        ///   Put a specified <see cref="RoleFunctionEditor"/>.
        /// </summary>
        /// <param name="aRoleFunctionEditor">A <see cref="RoleFunctionEditor"/> object.</param>
        /// <param name="aFanToken">A fantoken.</param>
        //public static void PutRoleFunctionEditor(FanToken aFanToken, RoleFunctionEditor aRoleFunctionEditor)
        //{
        //    FanCallHandler.ServiceCall<RoleFunctionEditor>(aFanToken, "PutRoleFunctionEditor", aRoleFunctionEditor);
        //}

        #endregion

        #region Fan Service Calls

        /// <summary>
        /// Call the WebService with a request to return a Fan with a specified FanID
        /// </summary>
        /// <param name="aFan">The Fan object to return</param>
        /// <param name="aFanToken">A fantoken.</param>
        public static void GetFanByID(FanToken aFanToken, Fan aFan)
        {
            FanCallHandler.ServiceCall <Fan>(aFanToken, "GetFanByID", aFan);
        }
Beispiel #18
0
 /// <summary>
 /// Call the WebService with a request to Delete a Workout
 /// </summary>
 /// <param name="aWorkout">The Workout object to Delete</param>
 /// <param name="aFantoken">A fantoken.</param>
 public static void DeleteWorkout(FanToken aFantoken, Workout aWorkout)
 {
     FanCallHandler.ServiceCall <Workout>(aFantoken, "DeleteWorkout", aWorkout);
 }
Beispiel #19
0
 /// <summary>
 ///   Gets a specified <see cref="FanSessionActivityCollection"/>.
 /// </summary>
 /// <param name="aFanToken">A <see cref="FanToken"/> object used for Access Control.</param>
 /// <param name="aFanSessionActivityCollection"><see cref="FanSessionActivity"/>Collection object.</param>
 public static void GetFanSessionActivityCollection(FanToken aFanToken, FanSessionActivityCollection aFanSessionActivityCollection)
 {
     FanCallHandler.ServiceCall <FanSessionActivityCollection>(aFanToken, "GetFanSessionActivityCollection", aFanSessionActivityCollection);
 }
Beispiel #20
0
 /// <summary>
 /// Add a <see cref="FanWorkout" />.
 /// </summary>
 /// <param name="aFanToken">A <see cref="FanToken" /> object used for Access Control.</param>
 /// <param name="aFanWorkoutCollection">A provider suburb collection.</param>
 public static void SaveFanWorkout(FanToken aFanToken, FanWorkoutCollection aFanWorkoutCollection)
 {
     FanCallHandler.ServiceCall <FanWorkoutCollection>(aFanToken, "SaveFanWorkout", aFanWorkoutCollection);
 }
Beispiel #21
0
 /// <summary>
 /// Call the WebService with a request to Delete a FanSession
 /// </summary>
 /// <param name="aFanSession">The FanSession object to Delete</param>
 /// <param name="aFantoken">A fantoken.</param>
 public static void DeleteFanSession(FanToken aFantoken, FanSession aFanSession)
 {
     FanCallHandler.ServiceCall <FanSession>(aFantoken, "DeleteFanSession", aFanSession);
 }
Beispiel #22
0
 /// <summary>
 ///   Gets a specified <see cref="FanWorkout"/> by key.
 /// </summary>
 /// <param name="aFanToken">A <see cref="FanToken"/> object used for Access Control.</param>
 /// <param name="aFanWorkout"><see cref="FanWorkout"/> object.</param>
 public static void GetFanWorkout(FanToken aFanToken, FanWorkout aFanWorkout)
 {
     FanCallHandler.ServiceCall <FanWorkout>(aFanToken, "GetFanWorkout", aFanWorkout);
 }
Beispiel #23
0
 /// <summary>
 ///   Gets a specified <see cref="FanWorkoutCollection"/>.
 /// </summary>
 /// <param name="aFanToken">A <see cref="FanToken"/> object used for Access Control.</param>
 /// <param name="aFanWorkoutCollection"><see cref="FanWorkout"/>Collection object.</param>
 public static void GetFanWorkoutCollection(FanToken aFanToken, FanWorkoutCollection aFanWorkoutCollection)
 {
     FanCallHandler.ServiceCall <FanWorkoutCollection>(aFanToken, "GetFanWorkoutCollection", aFanWorkoutCollection);
 }
Beispiel #24
0
 /// <summary>
 ///   Delete a specified <see cref="Role"/>.
 /// </summary>
 /// <param name="aRole"><see cref="Role"/> object.</param>
 /// <param name="aFanToken">A fantoken.</param>
 public static void DeleteRole(FanToken aFanToken, Role aRole)
 {
     FanCallHandler.ServiceCall <Role>(aFanToken, "DeleteRole", aRole);
 }
Beispiel #25
0
 /// <summary>
 /// Gets a FanCollection
 /// </summary>
 /// <param name="aFantoken">A fantoken.</param>
 /// <param name="aExerciseCollection">A user collection.</param>
 public static void GetExerciseCollection(FanToken aFantoken, ExerciseCollection aExerciseCollection)
 {
     FanCallHandler.ServiceCall <ExerciseCollection>(aFantoken, "GetExerciseCollection", aExerciseCollection);
 }
Beispiel #26
0
 /// <summary>
 /// Gets a FanCollection
 /// </summary>
 /// <param name="aFantoken">A fantoken.</param>
 /// <param name="aActivityCollection">A user collection.</param>
 public static void GetActivityCollection(FanToken aFantoken, ActivityCollection aActivityCollection)
 {
     FanCallHandler.ServiceCall <ActivityCollection>(aFantoken, "GetActivityCollection", aActivityCollection);
 }
Beispiel #27
0
 /// <summary>
 ///   Gets a specified <see cref="FriendCollection"/>.
 /// </summary>
 /// <param name="aFanToken">A <see cref="FanToken"/> object used for Access Control.</param>
 /// <param name="aFriendCollection"><see cref="Friend"/>Collection object.</param>
 public static void GetFriendCollection(FanToken aFanToken, FriendCollection aFriendCollection)
 {
     FanCallHandler.ServiceCall <FriendCollection>(aFanToken, "GetFriendCollection", aFriendCollection);
 }
Beispiel #28
0
 /// <summary>
 ///   Gets a specified <see cref="FanSessionActivity"/> by key.
 /// </summary>
 /// <param name="aFanToken">A <see cref="FanToken"/> object used for Access Control.</param>
 /// <param name="aFanSessionActivity"><see cref="FanSessionActivity"/> object.</param>
 public static void GetFanSessionActivity(FanToken aFanToken, FanSessionActivity aFanSessionActivity)
 {
     FanCallHandler.ServiceCall <FanSessionActivity>(aFanToken, "GetFanSessionActivity", aFanSessionActivity);
 }
Beispiel #29
0
 /// <summary>
 /// Call the WebService with a request to Delete a Activity
 /// </summary>
 /// <param name="aActivity">The Activity object to Delete</param>
 /// <param name="aFantoken">A fantoken.</param>
 public static void DeleteActivity(FanToken aFantoken, Activity aActivity)
 {
     FanCallHandler.ServiceCall <Activity>(aFantoken, "DeleteActivity", aActivity);
 }
Beispiel #30
0
 /// <summary>
 /// Call the WebService with a request to Delete a Exercise
 /// </summary>
 /// <param name="aExercise">The Exercise object to Delete</param>
 /// <param name="aFantoken">A fantoken.</param>
 public static void DeleteExercise(FanToken aFantoken, Exercise aExercise)
 {
     FanCallHandler.ServiceCall <Exercise>(aFantoken, "DeleteExercise", aExercise);
 }