當前位置: 首頁>>代碼示例>>C#>>正文


C# ActionResult類代碼示例

本文整理匯總了C#中ActionResult的典型用法代碼示例。如果您正苦於以下問題:C# ActionResult類的具體用法?C# ActionResult怎麽用?C# ActionResult使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ActionResult類屬於命名空間,在下文中一共展示了ActionResult類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的ActionResult類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。