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

C# aAction类代码示例

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

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



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

示例1: observe

        /// <summary>
        /// 监控其他 action
        /// </summary>
        /// <param name="action"></param>
        protected void observe( aAction action )
        {
            Type t = action.Target.GetType();

            String actions;
            dic.TryGetValue( t, out actions );

            dic[t] = strUtil.Join( actions, action.Method.Name );
        }
开发者ID:ningboliuwei,项目名称:wojilu,代码行数:13,代码来源:ActionObserver.cs


示例2: Run

        public static String Run( MvcContext ctx, aAction action )
        {
            ControllerBase targetController = action.Target as ControllerBase;

            ControllerFactory.InjectController( targetController, ctx );
            targetController.view( action.Method.Name );
            action();
            return targetController.utils.getActionResult();
        }
开发者ID:LeoLcy,项目名称:cnblogsbywojilu,代码行数:9,代码来源:ControllerRunner.cs


示例3: getPoll_Actions

        public static String getPoll_Actions() {
            Forum.Users.PollController t = new Forum.Users.PollController();
            aAction[] arrActions = new aAction[] { t.Add, t.Create };
            aActionWithId[] arrActions2 = new aActionWithId[] { t.Vote, t.Voter };
            StringBuilder sb = new StringBuilder();

            addActions( sb, arrActions );
            addActions( sb, arrActions2 );

            return sb.ToString();
        }
开发者ID:2014AmethystCat,项目名称:wojilu,代码行数:11,代码来源:SecurityActionHelper.cs


示例4: getPath

        public static String getPath( aAction action, String rootNamespace )
        {
            String nsString;

            MethodInfo method = action.Method;

            nsString = strUtil.TrimStart( action.Target.GetType().FullName, rootNamespace );
            nsString = strUtil.TrimEnd( nsString, "Controller" );
            nsString = strUtil.TrimStart( nsString, "." ).Replace( ".", "/" );

            String path = strUtil.Join( nsString, method.Name );
            return path;
        }
开发者ID:robin88,项目名称:wojilu,代码行数:13,代码来源:SecurityUtils.cs


示例5: runAction

        public static void runAction( MvcContext ctx, ControllerBase controller, MethodInfo actionMethod, aAction run, Boolean isLayout )
        {
            if (isLayout) {
                run();
                return;
            }

            List<IActionFilter> filters = controller.utils.getActionFilters( actionMethod );
            //filters.Insert( 0, new CacheUrlAttribute() ); // Ĭ��������ַ������ͨ���޸����ý��л���

            if (filters.Count == 0) {
                run();
                return;
            }

            for (int i = 0; i < filters.Count; i++) {

                filters[i].BeforeAction( controller );

                if (ctx.utils.isEnd()) {
                    return;
                }

            }

            try {
                if (controller.utils.IsRunAction()) {
                    run();
                }
            }
            catch (Exception ex) {
                ctx.utils.setException( ex );
            }
            finally {

                for (int i = filters.Count - 1; i >= 0; i--) {

                    filters[i].AfterAction( controller );

                    if (ctx.utils.isEnd()) {
                        break;
                    }

                }

                Exception ex = ctx.utils.getException();
                if (ex != null) throw ctx.utils.getException();
            }
        }
开发者ID:robin88,项目名称:wojilu,代码行数:49,代码来源:ActionRunner.cs


示例6: getAdminActions

        public static String getAdminActions() {

            Forum.Edits.TopicController ut = new Forum.Edits.TopicController();
            Forum.Edits.PostController up = new Forum.Edits.PostController();
            Forum.Edits.AttachmentController ac = new Forum.Edits.AttachmentController();
            Forum.Edits.TagController tc = new Forum.Edits.TagController();

            Forum.Moderators.TopicController t = new Forum.Moderators.TopicController();
            Forum.Moderators.TopicSaveController ts = new Forum.Moderators.TopicSaveController();
            Forum.Moderators.PostController p = new Forum.Moderators.PostController();
            Forum.Moderators.PostSaveController ps = new Forum.Moderators.PostSaveController();

            aActionWithId[] arrActions = new aActionWithId[] {


                // (admin) post
                p.AddCredit,
                ps.SaveCredit, ps.Ban, ps.UnBan, ps.Lock, ps.UnLock, ps.DeletePost, ps.DeleteTopic,

                // (edit) topic/post
                ut.Edit, ut.Update, up.Edit, up.Update,
                //up.SetReward, up.AddReward, up.SaveReward, 

                // (edit) attachment
                ac.Admin, ac.SetPermission, ac.SavePermission, ac.SaveSort, ac.Add, ac.SaveAdd, ac.Rename, ac.SaveRename, ac.Upload, ac.SaveUpload, ac.Delete,

                // (edit) tag
                tc.SaveTag
            };

            aAction[] otherActions = new aAction[] { 

                // (admin) topic 
                t.Sticky, t.Picked, t.Lock, t.Delete, t.Highlight, t.Category, t.SortSticky, t.GlobalSticky, t.Move,
                ts.Sticky, ts.StickyUndo, ts.Lock, ts.LockUndo, ts.GlobalSticky, ts.GlobalStickyUndo, ts.Pick, ts.PickedUndo, ts.Highlight, ts.HighlightUndo, ts.Delete,
                ts.Move, ts.SaveStickySort, ts.Category,
                t.GlobalSortSticky, ts.SaveGlobalStickySort
            };

            StringBuilder sb = new StringBuilder();
            addActions( sb, arrActions );
            addActions( sb, otherActions );

            return sb.ToString();
        }
开发者ID:2014AmethystCat,项目名称:wojilu,代码行数:45,代码来源:SecurityActionHelper.cs


示例7: Run

        /// <summary>
        /// 运行某 action
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="action"></param>
        /// <returns></returns>
        public static String Run( ControllerBase thisController, aAction action )
        {
            ControllerBase targetController = action.Target as ControllerBase;

            // 如果是当前controller,则直接调用;因为必须允许内部成员变量共享
            if (Object.ReferenceEquals( thisController, targetController )) {
                Template originalView = thisController.utils.getCurrentView();
                thisController.view( action.Method.Name );
                action();
                String result = thisController.utils.getActionResult();
                thisController.utils.setCurrentView( originalView );

                return result;
            }
            else {
                ControllerFactory.InjectController( targetController, thisController.ctx );
                targetController.view( action.Method.Name );
                action();
                return targetController.utils.getActionResult();
            }
        }
开发者ID:NOTHEN,项目名称:wojilu,代码行数:27,代码来源:ControllerRunner.cs


示例8: SiteDataAdminMenu

 public SiteDataAdminMenu( int id, String logo, String name, aAction action, String rootNamespace )
 {
     String url = SecurityUtils.getPath( action, rootNamespace );
     init( id, logo, name, url );
 }
开发者ID:Boshin,项目名称:wojilu,代码行数:5,代码来源:SiteDataAdminMenu.cs


示例9: To

 public static String To( IMember member, aAction action, long appId )
 {
     String ownerPath = LinkHelper.GetMemberPathPrefix( member );
     String url = toPrivate( action );
     if (url == null) return null;
     url = LinkHelper.addAppId( url, appId );
     return appendExt( strUtil.Join( ownerPath, url ) );
 }
开发者ID:2014AmethystCat,项目名称:wojilu,代码行数:8,代码来源:LinkMap.cs


示例10: toPrivate

        private static String toPrivate( aAction action )
        {
            Dictionary<String, String> map = getMap();
            if (map.Count == 0) return null;

            String actionName = isLinkToLow ? action.Method.Name.ToLower() : action.Method.Name;

            String controller = action.Target.GetType().FullName;

            return getLinkActionStr( map, controller, actionName );
        }
开发者ID:2014AmethystCat,项目名称:wojilu,代码行数:11,代码来源:LinkMap.cs


示例11: load

 /// <summary>
 /// 加载其他 action 内容,到当前html代码处
 /// </summary>
 /// <param name="action"></param>
 public static void load( aAction action )
 {
 }
开发者ID:2014AmethystCat,项目名称:wojilu,代码行数:7,代码来源:v.cs


示例12: To

 public static String To( aAction action )
 {
     return To( null, action, -1 );
 }
开发者ID:KDF5000,项目名称:wojilu,代码行数:4,代码来源:Link.cs


示例13: getAction

 public static String getAction( aAction a )
 {
     return getAction( a.Method );
 }
开发者ID:robin88,项目名称:wojilu,代码行数:4,代码来源:SecurityActionHelper.cs


示例14: addActions

 private static void addActions( StringBuilder sb, aAction[] arrActions )
 {
     foreach (aAction a in arrActions) {
         sb.Append( getAction( a.Method ) );
     }
 }
开发者ID:robin88,项目名称:wojilu,代码行数:6,代码来源:SecurityActionHelper.cs


示例15: SiteAdminOperation

 public SiteAdminOperation(long id, string name, long menuId, aAction action, string rootNamespace)
 {
     init( id, name, menuId );
     this.Url = SecurityUtils.getPath( action.Method, rootNamespace );
     checkLowerUrl();
 }
开发者ID:2014AmethystCat,项目名称:wojilu,代码行数:6,代码来源:SiteAdminOperation.cs


示例16: lnkToUser

 private static String lnkToUser( User user, aAction action )
 {
     return Link.To( user, action, 0 );
 }
开发者ID:ningboliuwei,项目名称:wojilu,代码行数:4,代码来源:RegUtils.cs


示例17: to

 /// <summary>
 /// 生成到某个action的链接
 /// </summary>
 /// <param name="action"></param>
 /// <returns></returns>
 public static String to( aAction action )
 {
     return "";
 }
开发者ID:2014AmethystCat,项目名称:wojilu,代码行数:9,代码来源:link.cs


示例18: to

 //-------------------------------------- 内部链接(快捷方式) ----------------------------------------------
 /// <summary>
 /// 链接到某个 action
 /// </summary>
 /// <param name="action"></param>
 /// <returns>返回一个链接</returns>
 public String to( aAction action )
 {
     return ctx.link.To( action );
 }
开发者ID:2014AmethystCat,项目名称:wojilu,代码行数:10,代码来源:ControllerBase.cs


示例19: GetByAction

        //-----------------------------------------------------------------------------

        public static SecurityAction GetByAction( aAction a ) {

            return GetByUrl( SecurityActionHelper.getAction( a ) );
        }
开发者ID:2014AmethystCat,项目名称:wojilu,代码行数:6,代码来源:SecurityAction.cs


示例20: view

 /// <summary>
 /// 手动指定当前 action 的视图文件(指定视图文件之后,默认的模板将被忽略)
 /// </summary>
 /// <param name="action"></param>
 public void view( aAction action )
 {
     view( action.Method );
 }
开发者ID:2014AmethystCat,项目名称:wojilu,代码行数:8,代码来源:ControllerBase.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# acUI.acUI类代码示例发布时间:2022-05-24
下一篇:
C# __arglist类代码示例发布时间: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