本文整理汇总了C#中HttpGet.GetString方法的典型用法代码示例。如果您正苦于以下问题:C# HttpGet.GetString方法的具体用法?C# HttpGet.GetString怎么用?C# HttpGet.GetString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HttpGet
的用法示例。
在下文中一共展示了HttpGet.GetString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnRequested
protected override void OnRequested(HttpGet httpGet, IGameResponse response)
{
try
{
var actionId = httpGet.GetString("ActionID").ToInt();
var uid = httpGet.GetString("uid");
Console.WriteLine("Action{0} from {1} {2}", actionId, httpGet.RemoteAddress, uid);
ActionFactory.Request(httpGet, response, userId => new GameDataCacheSet<GameUser>().FindKey(userId.ToNotNullString()));
}
catch (Exception ex)
{
TraceLog.WriteError("{0}", ex);
}
}
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;//new HttpResponse(sw);
response.Charset = "unicode";// "unicode";
HttpGet httpGet = new HttpGet();
String ActionID = string.Empty;
if (httpGet.GetString("ActionID", ref ActionID))
{
try
{
string actionName = string.Concat("Action", ActionID);
string sname = string.Concat("ZyGames.DirCenter.Action." + actionName);
object[] args = new object[1];
args[0] = response;
BaseStruct obj = (BaseStruct) Activator.CreateInstance(Type.GetType(sname), new object[] { httpGet });
if (obj.ReadUrlElement() && obj.DoAction() && !obj.GetError())
{
obj.BuildPacket();
obj.WriteAction();
}
else
{
obj.WriteErrorAction();
return;
}
}
catch (Exception ex)
{
BaseLog oBaseLog = new BaseLog("DirCenterErrMain");
oBaseLog.SaveLog(ex);
}
}
}
示例3: LoginProxy
public LoginProxy(HttpGet httpGet)
{
this._httpGet = httpGet;
if (_httpGet != null)
{
_httpGet.GetString("RetailID", ref retailID);
}
}
示例4: OnRequested
protected override void OnRequested(HttpGet httpGet, IGameResponse response)
{
try
{
var actionId = httpGet.ActionId;
var uid = httpGet.GetString("uid");
Console.WriteLine("Action{0} from {1} {2}", actionId, httpGet.RemoteAddress, uid);
ActionFactory.Request(httpGet, response, GetUser);
}
catch (Exception ex)
{
TraceLog.WriteError("{0}", ex);
}
}