• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# FanKey类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FanKey的典型用法代码示例。如果您正苦于以下问题:C# FanKey类的具体用法?C# FanKey怎么用?C# FanKey使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FanKey类属于命名空间,在下文中一共展示了FanKey类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetAccess

 /// <summary>
 /// Gets a specific access for a user.
 /// </summary>
 /// <param name="aFanKey">A user key composite.</param>
 /// <param name="aFunction">A function.</param>
 /// <returns></returns>
 public static Access GetAccess(FanKey aFanKey, string aFunction)
 {
     FanFunctionAccess vFanFunctionAccess = new FanFunctionAccess() { FannKey = aFanKey.FannKey };
     vFanFunctionAccess.FunctionAccess.Function = aFunction;
     Load(vFanFunctionAccess);
     return vFanFunctionAccess.FunctionAccess.Access;
 }
开发者ID:heinschulie,项目名称:zfit,代码行数:13,代码来源:FanFunctionAccessData.cs


示例2: AddFan

 /// <summary>
 ///   The <c>AddFan</c> implementation method deserializes an incoming XML Argument <see cref="string"/> as a new <see cref="Fan"/> object.
 ///   It invokes the <c>Insert</c> method of <see cref="FanBusiness"/> with the newly deserialized <see cref="Fan"/> object.
 ///   Finally, it returns the inserted object (now with an assigned Fan Key) as a serialized <see cref="string"/> of XML.
 /// </summary>
 /// <param name="aXmlArgument">XML Argument <see cref="string"/>.</param>
 /// <returns><see cref="Fan"/> as XML <see cref="string"/>.</returns>
 /// <exception cref="ArgumentNullException">If <c>aXmlArgument</c> is <c>null</c>.</exception>
 public static string AddFan(FanKey aFanKey, string aXmlArgument)
 {
     if (aXmlArgument == null)
     {
         throw new ArgumentNullException("aXmlArgument of AddFan");
     }
     Fan vFan = new Fan();
     vFan = XmlUtils.Deserialize<Fan>(aXmlArgument);
     FanBusiness.Insert(aFanKey, vFan);
     return XmlUtils.Serialize<Fan>(vFan, true);
 }
开发者ID:heinschulie,项目名称:zfit,代码行数:19,代码来源:FanImplementation.cs


示例3: AddExercise

 /// <summary>
 ///   The <c>AddExercise</c> implementation method deserializes an incoming XML Argument <see cref="string"/> as a new <see cref="Exercise"/> object.
 ///   It invokes the <c>Insert</c> method of <see cref="ExerciseBusiness"/> with the newly deserialized <see cref="Exercise"/> object.
 ///   Finally, it returns the inserted object (now with an assigned Exercise Key) as a serialized <see cref="string"/> of XML.
 /// </summary>
 /// <param name="aXmlArgument">XML Argument <see cref="string"/>.</param>
 /// <returns><see cref="Exercise"/> as XML <see cref="string"/>.</returns>
 /// <exception cref="ArgumentNullException">If <c>aXmlArgument</c> is <c>null</c>.</exception>
 public static string AddExercise(FanKey aFanKey, string aXmlArgument)
 {
     if (aXmlArgument == null)
     {
         throw new ArgumentNullException("aXmlArgument of AddExercise");
     }
     Exercise vExercise = new Exercise();
     vExercise = XmlUtils.Deserialize<Exercise>(aXmlArgument);
     ExerciseBusiness.Insert(aFanKey, vExercise);
     return XmlUtils.Serialize<Exercise>(vExercise, true);
 }
开发者ID:heinschulie,项目名称:zfit,代码行数:19,代码来源:FanImplementation.cs


示例4: AddRole

 /// <summary>
 ///   The <c>AddRole</c> implementation method deserializes an incoming XML Argument <see cref="string"/> as a new <see cref="Role"/> object.
 ///   It invokes the <c>Insert</c> method of <see cref="RoleBusiness"/> with the newly deserialized <see cref="Role"/> object.
 ///   Finally, it returns the inserted object (now with an assigned Role Key) as a serialized <see cref="string"/> of XML.
 /// </summary>
 /// <param name="aXmlArgument">XML Argument <see cref="string"/>.</param>
 /// <returns><see cref="Role"/> as XML <see cref="string"/>.</returns>
 /// <exception cref="ArgumentNullException">If <c>aXmlArgument</c> is <c>null</c>.</exception>
 public static string AddRole(FanKey aFanKey, string aXmlArgument)
 {
     if (aXmlArgument == null)
     {
         throw new ArgumentNullException("aXmlArgument of AddRole");
     }
     Role vRole = new Role();
     vRole = XmlUtils.Deserialize<Role>(aXmlArgument);
     RoleBusiness.Insert(aFanKey, vRole);
     return XmlUtils.Serialize<Role>(vRole, true);
 }
开发者ID:heinschulie,项目名称:zfit,代码行数:19,代码来源:FanImplementation.cs


示例5: AddCell

 /// <summary>
 ///   The <c>AddCell</c> implementation method deserializes an incoming XML Argument <see cref="string"/> as a new <see cref="Cell"/> object.
 ///   It invokes the <c>Insert</c> method of <see cref="CellBusiness"/> with the newly deserialized <see cref="Cell"/> object.
 ///   Finally, it returns the inserted object (now with an assigned Cell Key) as a serialized <see cref="string"/> of XML.
 /// </summary>
 /// <param name="aXmlArgument">XML Argument <see cref="string"/>.</param>
 /// <returns><see cref="Cell"/> as XML <see cref="string"/>.</returns>
 /// <exception cref="ArgumentNullException">If <c>aXmlArgument</c> is <c>null</c>.</exception>
 public static string AddCell(FanKey aFanKey, string aXmlArgument)
 {
     if (aXmlArgument == null)
     {
         throw new ArgumentNullException("aXmlArgument of AddCell");
     }
     Cell vCell = new Cell();
     vCell = XmlUtils.Deserialize<Cell>(aXmlArgument);
     CellBusiness.Insert(aFanKey, vCell);
     return XmlUtils.Serialize<Cell>(vCell, true);
 }
开发者ID:heinschulie,项目名称:zfit,代码行数:19,代码来源:FanImplementation.cs


示例6: AddActivity

 /// <summary>
 ///   The <c>AddActivity</c> implementation method deserializes an incoming XML Argument <see cref="string"/> as a new <see cref="Activity"/> object.
 ///   It invokes the <c>Insert</c> method of <see cref="ActivityBusiness"/> with the newly deserialized <see cref="Activity"/> object.
 ///   Finally, it returns the inserted object (now with an assigned Activity Key) as a serialized <see cref="string"/> of XML.
 /// </summary>
 /// <param name="aXmlArgument">XML Argument <see cref="string"/>.</param>
 /// <returns><see cref="Activity"/> as XML <see cref="string"/>.</returns>
 /// <exception cref="ArgumentNullException">If <c>aXmlArgument</c> is <c>null</c>.</exception>
 public static string AddActivity(FanKey aFanKey, string aXmlArgument)
 {
     if (aXmlArgument == null)
     {
         throw new ArgumentNullException("aXmlArgument of AddActivity");
     }
     Activity vActivity = new Activity();
     vActivity = XmlUtils.Deserialize<Activity>(aXmlArgument);
     ActivityBusiness.Insert(aFanKey, vActivity);
     return XmlUtils.Serialize<Activity>(vActivity, true);
 }
开发者ID:heinschulie,项目名称:zfit,代码行数:19,代码来源:FanImplementation.cs


示例7: Delete

        /// <summary>
        ///   Delete a <see cref="Fed"/> object passed as an argument.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aFed">A <see cref="Fed"/> object.</param>
        /// <exception cref="ArgumentNullException">If <c>aFed</c> argument is <c>null</c>.</exception>
        public static void Delete(FanKey aFanKey, Fed aFed)
        {
            if (aFed == null)
            {
                throw new ArgumentNullException("Delete Fed Business");
            }

            //if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Fed", AccessMode.Delete))
            //{
            //    throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FednKey), AccessMode.Delete, "Fed");
            //}

            FedData.Delete(aFed);
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:20,代码来源:FedBusiness.cs


示例8: Insert

        /// <summary>
        ///   Insert a <see cref="FanSession"/> object passed as an argument via Stored Procedure that returns the newly inserted <i>FanSession Key</i>.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aFanSession">A <see cref="FanSession"/> object.</param>
        /// <exception cref="ArgumentNullException">If <c>aFanSession</c> argument is <c>null</c>.</exception>
        public static void Insert(FanKey aFanKey, FanSession aFanSession)
        {
            if (aFanSession == null)
            {
                throw new ArgumentNullException("Insert FanSession Business");
            }

            //if (!FanFunctionAccessData.HasModeAccess(aFanKey, "FanSession", AccessMode.Create))
            //{
            //    throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Create, "FanSession");
            //}
            aFanSession.FanSessionDateDone = DateTime.Now.ToLongDateString();
            FanSessionData.Insert(aFanSession);
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:20,代码来源:FanSessionBusiness.cs


示例9: Delete

        /// <summary>
        ///   Delete a <see cref="FanSession"/> object passed as an argument.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aFanSession">A <see cref="FanSession"/> object.</param>
        /// <exception cref="ArgumentNullException">If <c>aFanSession</c> argument is <c>null</c>.</exception>
        public static void Delete(FanKey aFanKey, FanSession aFanSession)
        {
            if (aFanSession == null)
            {
                throw new ArgumentNullException("Delete FanSession Business");
            }

            //if (!FanFunctionAccessData.HasModeAccess(aFanKey, "FanSession", AccessMode.Delete))
            //{
            //    throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FanSessionnKey), AccessMode.Delete, "FanSession");
            //}

            FanSessionData.Delete(aFanSession);
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:20,代码来源:FanSessionBusiness.cs


示例10: Save

        /// <summary>
        /// Save a <see cref="FanFed" /> list passed as an argument.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey" /> object.</param>
        /// <param name="aFanFedCollection">A fan fed collection.</param>
        /// <exception cref="Zephry.ZpAccessException">Access Denied; FanFed</exception>
        /// <exception cref="ArgumentNullException">If <c>aFanFed</c> argument is <c>null</c>.</exception>
        public static void Save(FanKey aFanKey, FanFedCollection aFanFedCollection)
        {
            if (aFanFedCollection == null)
            {
                throw new ArgumentNullException("Update FanFedCollection Business");
            }

            //if (!FanFunctionAccessData.HasModeAccess(aFanKey, "FanFed", AccessMode.Update))
            //{
            //    throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Update, "FanFed");
            //}

            FanFedData.Save(aFanFedCollection);
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:21,代码来源:FanFedBusiness.cs


示例11: Delete

        /// <summary>
        ///   Delete a <see cref="FanRole"/> object passed as an argument.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aFanRole">A <see cref="FanRole"/> object.</param>
        /// <exception cref="ArgumentNullException">If <c>aFanRole</c> argument is <c>null</c>.</exception>
        public static void Delete(FanKey aFanKey, FanRole aFanRole)
        {
            if (aFanRole == null)
            {
                throw new ArgumentNullException("Delete FanRole Business");
            }

            if (!FanFunctionAccessData.HasModeAccess(aFanKey, "FanRole", AccessMode.Delete))
            {
                throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Delete, "FanRole");
            }

            FanRoleData.Delete(aFanRole);
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:20,代码来源:FanRoleBusiness.cs


示例12: Load

        /// <summary>
        ///   The overloaded Load method that will return a specific <see cref="Exercise"/> object, with keys in <c>aExercise</c>.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aExercise">A <see cref="Exercise"/>.</param>
        /// <exception cref="ArgumentNullException">If <c>aExercise</c> is <c>null</c>.</exception>
        public static void Load(FanKey aFanKey, Exercise aExercise)
        {
            if (aExercise == null)
            {
                throw new ArgumentNullException("Load Exercise Business");
            }

            //if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Exercise", AccessMode.Read))
            //{
            //    throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.ExercisenKey), AccessMode.Read, "Exercise");
            //}

            ExerciseData.Load(aExercise);
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:20,代码来源:ExerciseBusiness.cs


示例13: Insert

        /// <summary>
        ///   Insert a <see cref="Exercise"/> object passed as an argument via Stored Procedure that returns the newly inserted <i>Exercise Key</i>.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aExercise">A <see cref="Exercise"/> object.</param>
        /// <exception cref="ArgumentNullException">If <c>aExercise</c> argument is <c>null</c>.</exception>
        public static void Insert(FanKey aFanKey, Exercise aExercise)
        {
            if (aExercise == null)
            {
                throw new ArgumentNullException("Insert Exercise Business");
            }

            //if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Exercise", AccessMode.Create))
            //{
            //    throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Create, "Exercise");
            //}

            ExerciseData.Insert(aExercise);
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:20,代码来源:ExerciseBusiness.cs


示例14: Load

        /// <summary>
        ///   The overloaded Load method that will return a specific <see cref="Activity"/> object, with keys in <c>aActivity</c>.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aActivity">A <see cref="Activity"/>.</param>
        /// <exception cref="ArgumentNullException">If <c>aActivity</c> is <c>null</c>.</exception>
        public static void Load(FanKey aFanKey, Activity aActivity)
        {
            if (aActivity == null)
            {
                throw new ArgumentNullException("Load Activity Business");
            }

            //if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Activity", AccessMode.Read))
            //{
            //    throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.ActivitynKey), AccessMode.Read, "Activity");
            //}

            ActivityData.Load(aActivity);
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:20,代码来源:ActivityBusiness.cs


示例15: Insert

        /// <summary>
        ///   Insert a <see cref="Activity"/> object passed as an argument via Stored Procedure that returns the newly inserted <i>Activity Key</i>.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aActivity">A <see cref="Activity"/> object.</param>
        /// <exception cref="ArgumentNullException">If <c>aActivity</c> argument is <c>null</c>.</exception>
        public static void Insert(FanKey aFanKey, Activity aActivity)
        {
            if (aActivity == null)
            {
                throw new ArgumentNullException("Insert Activity Business");
            }

            //if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Activity", AccessMode.Create))
            //{
            //    throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Create, "Activity");
            //}

            ActivityData.Insert(aActivity);
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:20,代码来源:ActivityBusiness.cs


示例16: Load

        /// <summary>
        ///   The overloaded Load method that will return a specific <see cref="CellFan"/> object, with keys in <c>aCellFan</c>.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aCellFan">A <see cref="CellFan"/>.</param>
        /// <exception cref="ArgumentNullException">If <c>aCellFan</c> is <c>null</c>.</exception>
        public static void Load(FanKey aFanKey, CellFan aCellFan)
        {
            if (aCellFan == null)
            {
                throw new ArgumentNullException("Load CellFan Business");
            }

            if (!FanFunctionAccessData.HasModeAccess(aFanKey, "CellFan", AccessMode.Read))
            {
                throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Read, "CellFan");
            }

            CellFanData.Load(aCellFan);
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:20,代码来源:CellFanBusiness.cs


示例17: Insert

        /// <summary>
        ///   Insert a <see cref="Fan"/> object passed as an argument via Stored Procedure that returns the newly inserted <i>Fan Key</i>.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aFan">A <see cref="Fan"/> object.</param>
        /// <exception cref="ArgumentNullException">If <c>aFan</c> argument is <c>null</c>.</exception>
        public static void Insert(FanKey aFanKey, Fan aFan)
        {
            if (aFan == null)
            {
                throw new ArgumentNullException("Insert Fan Business");
            }

            if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Fanatic", AccessMode.Create))
            {
                throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Create, "Fan");
            }

            FanData.Insert(aFan);
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:20,代码来源:FanBusiness.cs


示例18: InitializeSession

        //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;
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:40,代码来源:FanInterface.cs


示例19: Load

        /// <summary>
        ///   The overloaded Load method that will return a specific <see cref="FanFed"/> object, with keys in <c>aFanFed</c>.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aFanFed">A <see cref="FanFed"/>.</param>
        /// <exception cref="ArgumentNullException">If <c>aFanFed</c> is <c>null</c>.</exception>
        public static void Load(FanKey aFanKey, FanFed aFanFed)
        {
            if (aFanFed == null)
            {
                throw new ArgumentNullException("Load FanFed Business");
            }

            //if (!FanFunctionAccessData.HasModeAccess(aFanKey, "FanFed", AccessMode.Read))
            //{
            //    throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Read, "FanFed");
            //}

            FanFedData.Load(aFanFed);
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:20,代码来源:FanFedBusiness.cs


示例20: Load

        /// <summary>
        ///   The overloaded Load method that will return a specific <see cref="Workout"/> object, with keys in <c>aWorkout</c>.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aWorkout">A <see cref="Workout"/>.</param>
        /// <exception cref="ArgumentNullException">If <c>aWorkout</c> is <c>null</c>.</exception>
        public static void Load(FanKey aFanKey, Workout aWorkout)
        {
            if (aWorkout == null)
            {
                throw new ArgumentNullException("Load Workout Business");
            }

            //if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Workout", AccessMode.Read))
            //{
            //    throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.WorkoutnKey), AccessMode.Read, "Workout");
            //}

            WorkoutData.Load(aWorkout);
        }
开发者ID:heinschulie,项目名称:zfit,代码行数:20,代码来源:WorkoutBusiness.cs



注:本文中的FanKey类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# FarPoint类代码示例发布时间:2022-05-24
下一篇:
C# FamilySymbol类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap