本文整理汇总了C#中IAccount.FindMobiles方法的典型用法代码示例。如果您正苦于以下问题:C# IAccount.FindMobiles方法的具体用法?C# IAccount.FindMobiles怎么用?C# IAccount.FindMobiles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAccount
的用法示例。
在下文中一共展示了IAccount.FindMobiles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateTransaction
protected virtual DonationTransaction CreateTransaction(
string id,
TransactionState state,
IAccount account,
string email,
double total,
long credit,
double time,
int version,
string notes,
string extra)
{
using (var stream = new MemoryStream())
{
var writer = stream.GetBinaryWriter();
writer.SetVersion(0);
writer.Write(id);
writer.WriteFlag(state);
writer.Write(account);
writer.Write(email);
writer.Write(total);
writer.Write(credit);
writer.Write(time);
writer.Write(version);
writer.Write(0);
writer.Write(notes);
writer.Write(extra);
var mobiles = account.FindMobiles<PlayerMobile>().OrderByDescending(m => m.GameTime.Ticks);
var recipient = mobiles.FirstOrDefault();
writer.Write(recipient);
writer.Write(recipient);
writer.Write(0.0);
writer.Flush();
stream.Position = 0;
var reader = stream.GetBinaryReader();
var t = new DonationTransaction(reader);
writer.Close();
reader.Close();
return t;
}
}
示例2: SpotCheck
public static void SpotCheck(IAccount a)
{
SpotCheck(a.FindMobiles(p => p != null && p.IsOnline()).FirstOrDefault());
}