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

C# ActionResult类代码示例

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

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



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

示例1: WriteAll

        public static void WriteAll(ActionResult output, TraceListener listener)
        {
            Trace.Listeners.Clear();
            Trace.Listeners.Add(new ExtendedConsoleTraceListener());

            foreach (var lineOutput in output.Output)
            {
                switch (lineOutput.TraceEventType)
                {
                    case TraceEventType.Error:
                        Trace.TraceError(lineOutput.Message);
                        break;
                    case TraceEventType.Warning:
                        Trace.TraceWarning(lineOutput.Message);
                        break;
                    default:
                        Trace.WriteLine(lineOutput.Message);
                        break;
                }
            }

            if (output.Value != null)
            {
                Trace.TraceInformation(string.Format("=> {0}", output.Value.ToString()));
            }
        }
开发者ID:netxph,项目名称:redspect,代码行数:26,代码来源:TraceWriter.cs


示例2: CreateRoteCallback

 private void CreateRoteCallback(ActionResult actionResult)
 {
     if (actionResult != null)
     {
         Application.LoadLevelAsync("MainScene");
     }
 }
开发者ID:Menq,项目名称:UnityScutDemo,代码行数:7,代码来源:Regist.cs


示例3: ApplyRoute

            public static void ApplyRoute(RouteCollection routes, ActionResult defaultHandler, string[] namespaces)
            {
                routes.MapRoute(HalamanC
                    , "{controller}/{PageIndex}/{PageSize}/{SortField}/{SortOrder}/{id}"
                    , defaultHandler
                    , new { SortOrder = SortDirection.Ascending, id = UrlParameter.Optional }
                    , new { PageIndex = @"\d+", PageSize = @"\d+" }
                    , namespaces: namespaces
                );

                routes.MapRoute(HalamanB
                    , "{controller}/{PageIndex}/{PageSize}/{id}"
                    , defaultHandler
                    , new { id = UrlParameter.Optional }
                    , new { PageIndex = @"\d+", PageSize = @"\d+" }
                    , namespaces: namespaces
                );

                routes.MapRoute(HalamanA
                    , "{controller}/{PageIndex}/{id}"
                    , defaultHandler
                    , new { id = UrlParameter.Optional }
                    , new { PageIndex = @"\d+" }
                    , namespaces: namespaces
                );
            }
开发者ID:dvsspr,项目名称:Halaman,代码行数:26,代码来源:HalamanConfiguration.cs


示例4: OnFinish

		public void OnFinish (ActionArguments arguments, ActionResult result)
		{
			if (callback != null)
			{
				callback.Invoke (arguments, result);
			}
		}
开发者ID:urbanairship,项目名称:xamarin-component,代码行数:7,代码来源:PendingResult.cs


示例5: RegistCallback

 private void RegistCallback(ActionResult actionResult)
 {
     if (actionResult != null)
     {
         user = actionResult["passportID"];
         pwd = actionResult["password"];
     }
 }
开发者ID:rambo-long,项目名称:Scut,代码行数:8,代码来源:Login.cs


示例6: POST

 public override ActionResult POST(System.Net.HttpListenerContext context, string httpActionPath)
 {
     FileRepository.SaveFile(context);
     var result = new ActionResult();
     result.HttpStatusCode = System.Net.HttpStatusCode.Redirect;
     result.Headers.Add(Tuple.Create("Location", "/"));
     return result;
 }
开发者ID:narent,项目名称:AirFolio,代码行数:8,代码来源:FilesAction.cs


示例7: RegistCallback

 private void RegistCallback(ActionResult actionResult)
 {
     if (actionResult != null)
     {
         user = actionResult.Get<string>("passportID");
         pwd = actionResult.Get<string>("password");
     }
 }
开发者ID:daneric,项目名称:Scut-samples,代码行数:8,代码来源:Login.cs


示例8: OnRankingCallback

 void OnRankingCallback(ActionResult actionResult)
 {
     Response1001Pack pack = actionResult.GetValue<Response1001Pack>();
     if (pack == null)
     {
         return;
     }
     rankList = pack.Items;
 }
开发者ID:houguohua,项目名称:Scut,代码行数:9,代码来源:TestGUI.cs


示例9: LoginCallback

 private void LoginCallback(ActionResult actionResult)
 {
     if (actionResult != null && int.Parse(actionResult["GuideID"]) == (int)ActionType.CreateRote)
     {
         Application.LoadLevelAsync("RoleScene");
         return;
     }
        Application.LoadLevelAsync("MainScene");
 }
开发者ID:rambo-long,项目名称:Scut,代码行数:9,代码来源:Login.cs


示例10: ResultExecutingContext

        public ResultExecutingContext(ControllerContext controllerContext, ActionResult result)
            : base(controllerContext)
        {
            if (result == null)
            {
                throw new ArgumentNullException("result");
            }

            Result = result;
        }
开发者ID:mhinze,项目名称:msmvc,代码行数:10,代码来源:ResultExecutingContext.cs


示例11: OnPlayerFirstInspected

 public void OnPlayerFirstInspected()
 {
     EventHandler<EntityEventArgs> handler = PlayerFirstInspected;
     if (handler != null)
     {
         var result = new ActionResult();
         result.IsSuccessful = true;
         handler(this, new EntityEventArgs(result));
     }
 }
开发者ID:Chris3y,项目名称:TextAdventure,代码行数:10,代码来源:Timeline.cs


示例12: OnMicrochipFirstTaken

 public void OnMicrochipFirstTaken()
 {
     EventHandler<EntityEventArgs> handler = MicrochipFirstTaken;
     if (handler != null)
     {
         var result = new ActionResult();
         result.IsSuccessful = true;
         handler(this, new EntityEventArgs(result));
     }
 }
开发者ID:Chris3y,项目名称:TextAdventure,代码行数:10,代码来源:Timeline.cs


示例13: FireEvent

 public void FireEvent(EventHandler<EntityEventArgs> eventToFire)
 {
     EventHandler<EntityEventArgs> handler = eventToFire;
     if (handler != null)
     {
         var result = new ActionResult();
         result.IsSuccessful = true;
         handler(this, new EntityEventArgs(result));
     }
 }
开发者ID:Chris3y,项目名称:TextAdventure,代码行数:10,代码来源:Timeline.cs


示例14: DecodePackage

    protected override void DecodePackage(NetReader reader)
    {
        actionResult = new ActionResult();
        actionResult["passportID"] = reader.readString();
        actionResult["password"] = reader.readString();

        //TODO:登录服务器获取账号
        //var passport = reader.readValue<Passport>();
        //actionResult["passportID"] = passport.PassportId;
        //actionResult["password"] = passport.Password;
    }
开发者ID:Menq,项目名称:UnityScutDemo,代码行数:11,代码来源:Action1002.cs


示例15: ResultExecutedContext

        public ResultExecutedContext(ControllerContext controllerContext, ActionResult result, bool canceled,
		                             Exception exception)
            : base(controllerContext)
        {
            if (result == null)
            {
                throw new ArgumentNullException("result");
            }

            Result = result;
            Canceled = canceled;
            Exception = exception;
        }
开发者ID:mhinze,项目名称:msmvc,代码行数:13,代码来源:ResultExecutedContext.cs


示例16: getNextAction

 public override Action getNextAction(ref ActionResult result)
 {
     if (nextAction == null)
     {
         result = ActionResult.PlayerWait;
         return null;
     }
     else
     {
         energy = ENERGY_THRESHOLD;
         return base.getNextAction(ref result);
     }
 }
开发者ID:ggilbert108,项目名称:ProjectR,代码行数:13,代码来源:Hero.cs


示例17: OnCallback

    public void OnCallback(ActionResult result)
    {
        try
        {
            if(Callback != null)
			{
				Callback(result);	
			}
        }
        catch (Exception ex)
        {
            Debug.Log(string.Format("Action {0} callback process error:{1}", ActionId, ex));
        }
    }
开发者ID:daneric,项目名称:Scut-samples,代码行数:14,代码来源:GameAction.cs


示例18: getNextAction

 public override Action getNextAction(ref ActionResult result)
 {
     if (nextAction == null)
     {
         if (_canSeePlayer)
         {
             setNextAction(new MoveTowardHeroAction());
         }
         else
         {
             setNextAction(new MoveRandomlyAction());
         }
     }
     return base.getNextAction(ref result);
 }
开发者ID:ggilbert108,项目名称:ProjectR,代码行数:15,代码来源:Monster.cs


示例19: AuthenticationChallengeContext

        public AuthenticationChallengeContext(ControllerContext controllerContext, ActionDescriptor actionDescriptor,
            ActionResult result)
            : base(controllerContext)
        {
            if (actionDescriptor == null)
            {
                throw new ArgumentNullException("actionDescriptor");
            }

            if (result == null)
            {
                throw new ArgumentNullException("result");
            }

            _actionDescriptor = actionDescriptor;
            _result = result;
        }
开发者ID:brianly,项目名称:aspnetwebstack,代码行数:17,代码来源:AuthenticationChallengeContext.cs


示例20: Excute

        /// <summary>
        /// 执行
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public override ActionResult Excute(BInput input)
        {
            if(this.m_iRunningIndex >= this.m_lstChildren.Count)
            {
                return this.m_eResult;
            }

            ActionResult result = this.m_lstChildren[this.m_iRunningIndex].RunNode(input);
            if(result == ActionResult.FAILURE)
            {
                this.m_eResult = ActionResult.FAILURE;
            }
            if(result != ActionResult.RUNNING)
                this.m_iRunningIndex++;

            return ActionResult.RUNNING;
        }
开发者ID:softwareyangsong,项目名称:Unity3DAIBehaviorTree,代码行数:22,代码来源:BNodeParallelAllSuccess.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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