本文整理汇总了C#中System.Web.Security.MembershipUser.UserId方法的典型用法代码示例。如果您正苦于以下问题:C# MembershipUser.UserId方法的具体用法?C# MembershipUser.UserId怎么用?C# MembershipUser.UserId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.Security.MembershipUser
的用法示例。
在下文中一共展示了MembershipUser.UserId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AcceptOffer
public static void AcceptOffer(out Selling o, ref MembershipUser seller, ref MembershipUser buyer, out int history)
{
SelectOffer(out o, ref seller, ref buyer);
int res = SellingFacade.AcceptOffer(ref o, buyer.UserId(), out history);
Assert.AreEqual(res, 1);
Assert.Greater(history, 0);
Assert.AreEqual(o.TransactionPhase, TransactionPhase.Accept);
Trace.WriteLine(o.ToXmlString());
}
示例2: SelectOffer
public static void SelectOffer(out Selling o, ref MembershipUser seller, ref MembershipUser buyer)
{
o = AddOffer(seller == null ? null : (Guid?)seller.UserId(), null);
Assert.IsNotNull(o);
if (seller == null)
{
seller = UsersFacade.GetUser(o.SellerId);
}
if (buyer == null)
{
buyer = UsersFacadeHelper.GetRandomUser(new[] { o.SellerId });
}
int res = SellingFacade.SelectOffer(o, buyer.UserId());
Assert.AreEqual(res, 1);
Dictionary<Guid, int> dic = SellingFacade.GetOfferBuyers(o.SellingId);
Assert.IsTrue(dic.ContainsKey(buyer.UserId()));
Assert.AreEqual(dic[buyer.UserId()], 1);
}