本文整理汇总了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()));
}
}
示例2: CreateRoteCallback
private void CreateRoteCallback(ActionResult actionResult)
{
if (actionResult != null)
{
Application.LoadLevelAsync("MainScene");
}
}
示例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
);
}
示例4: OnFinish
public void OnFinish (ActionArguments arguments, ActionResult result)
{
if (callback != null)
{
callback.Invoke (arguments, result);
}
}
示例5: RegistCallback
private void RegistCallback(ActionResult actionResult)
{
if (actionResult != null)
{
user = actionResult["passportID"];
pwd = actionResult["password"];
}
}
示例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;
}
示例7: RegistCallback
private void RegistCallback(ActionResult actionResult)
{
if (actionResult != null)
{
user = actionResult.Get<string>("passportID");
pwd = actionResult.Get<string>("password");
}
}
示例8: OnRankingCallback
void OnRankingCallback(ActionResult actionResult)
{
Response1001Pack pack = actionResult.GetValue<Response1001Pack>();
if (pack == null)
{
return;
}
rankList = pack.Items;
}
示例9: LoginCallback
private void LoginCallback(ActionResult actionResult)
{
if (actionResult != null && int.Parse(actionResult["GuideID"]) == (int)ActionType.CreateRote)
{
Application.LoadLevelAsync("RoleScene");
return;
}
Application.LoadLevelAsync("MainScene");
}
示例10: ResultExecutingContext
public ResultExecutingContext(ControllerContext controllerContext, ActionResult result)
: base(controllerContext)
{
if (result == null)
{
throw new ArgumentNullException("result");
}
Result = result;
}
示例11: OnPlayerFirstInspected
public void OnPlayerFirstInspected()
{
EventHandler<EntityEventArgs> handler = PlayerFirstInspected;
if (handler != null)
{
var result = new ActionResult();
result.IsSuccessful = true;
handler(this, new EntityEventArgs(result));
}
}
示例12: OnMicrochipFirstTaken
public void OnMicrochipFirstTaken()
{
EventHandler<EntityEventArgs> handler = MicrochipFirstTaken;
if (handler != null)
{
var result = new ActionResult();
result.IsSuccessful = true;
handler(this, new EntityEventArgs(result));
}
}
示例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));
}
}
示例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;
}
示例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;
}