当前位置: 首页>>代码示例>>C#>>正文


C# IUserSession类代码示例

本文整理汇总了C#中IUserSession的典型用法代码示例。如果您正苦于以下问题:C# IUserSession类的具体用法?C# IUserSession怎么用?C# IUserSession使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IUserSession类属于命名空间,在下文中一共展示了IUserSession类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Init

        public void Init(IInviteFriends view)
        {
            _view = view;
            _userSession = ObjectFactory.GetInstance<IUserSession>();
            _email = ObjectFactory.GetInstance<IEmail>();
            _webContext = ObjectFactory.GetInstance<IWebContext>();
            _account = _userSession.CurrentUser;

            if (_account != null)
            {
                _view.DisplayToData(_account.FirstName + " " + _account.LastName + " &lt;" + _account.Email + "&gt;");

                if (_webContext.AccoundIdToInvite > 0)
                {
                    _accountToInvite = Account.GetAccountByID(_webContext.AccoundIdToInvite);

                    if (_accountToInvite != null)
                    {
                        SendInvitation(_accountToInvite.Email,
                                       _accountToInvite.FirstName + " " + _accountToInvite.LastName + " muốn kết bạn với bạn!");
                        _view.ShowMessage(" Yêu cầu kết bạn đã được gửi đến" + _accountToInvite.Username);
                        _view.TogglePnlInvite(false);
                    }
                }
            }
        }
开发者ID:lengocluyen,项目名称:pescode,代码行数:26,代码来源:InviteFriendsPresenter.cs

示例2: Init

        public void Init(IInviteFriends view)
        {
            _view = view;
            //_userSession = ObjectFactory.GetInstance<IUserSession>();
            //_email = ObjectFactory.GetInstance<IEmail>();
            //_friendInvitationRepository = ObjectFactory.GetInstance<IFriendInvitationRepository>();
            //_accountRepository = ObjectFactory.GetInstance<IAccountRepository>();
            //_webContext = ObjectFactory.GetInstance<IWebContext>();
            _userSession = new SPKTCore.Core.Impl.UserSession();
            _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository();
            _email = new SPKTCore.Core.Impl.Email();
            _webContext = new SPKTCore.Core.Impl.WebContext();
            if (_userSession.LoggedIn)
            {
                _account = _userSession.CurrentUser;
                _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository();
                if (_account != null)
                {
                    _view.DisplayToData(_account.UserName + " &lt;" + _account.Email + "&gt;");

                    if (_webContext.AccoundIdToInvite > 0)
                    {
                        _accountToInvite = _accountRepository.GetAccountByID(_webContext.AccoundIdToInvite);

                        if (_accountToInvite != null)
                        {
                            SendInvitation(_accountToInvite.Email,
                                           _account.UserName + " " + _account.UserName + " ");
                            _view.ShowMessage(_accountToInvite.UserName + " Đã được gửi đi!");
                            _view.TogglePnlInvite(false);
                        }
                    }
                }
            }
        }
开发者ID:SPKT,项目名称:MHX2,代码行数:35,代码来源:InviteFriend.cs

示例3: TableQueryInfo

 public TableQueryInfo(IUserSession session, TableInfo tableInfo, ObjectName tableName, ObjectName aliasName)
 {
     Session = session;
     TableInfo = tableInfo;
     TableName = tableName;
     AliasName = aliasName;
 }
开发者ID:furesoft,项目名称:deveeldb,代码行数:7,代码来源:UserSessionExtensions.cs

示例4: SaveCard

        public ICard SaveCard(IUserSession session, ICard newCard)
        {
            CardEffect effect = new CardEffect
            {
                Affected = (int)newCard.Effect.Affected,
                CardAttackChange = newCard.Effect.CardAttackChange,
                CardAttackMultiplier = newCard.Effect.CardAttackMultiplier,
                Description = newCard.Effect.Description,
                DisableOpponentEffect = newCard.Effect.DisableOpponentEffect,
                EffectTiming = (int)newCard.Effect.EffectTiming,
                LifePointsChange = newCard.Effect.LifePointsChange,
                Name = newCard.Effect.Name,
                ProbabilityOfEffect = newCard.Effect.ProbabilityOfEffect
            };

            Card created = new Card
            {
                Name = newCard.Name,
                ImageUrl = newCard.ImageUrl,
                Effect = effect,
                AttackPoints = newCard.AttackPoints,
                DefensePoints = newCard.DefensePoints
            };

            RequestContext.Model<Entities>().AddToCards(created);
            RequestContext.Model<Entities>().SaveChanges();

            return created;
        }
开发者ID:marcel-valdez,项目名称:dot_net_cop_example,代码行数:29,代码来源:CardContainer.cs

示例5: PublicController

 public PublicController(
     IMiddleManagement MiddleManagement,
     IUserSession UserSession,
     IFormsAuthentication FormAuthentication)
     : base(MiddleManagement, UserSession, FormAuthentication)
 {
 }
开发者ID:nathanpalmer,项目名称:LittleBanking,代码行数:7,代码来源:PublicController.cs

示例6: RegisterController

 /// <summary>
 /// Initializes a new instance of the <see cref="JoinController"/> class.
 /// </summary>
 /// <param name="userRepository">The user repository.</param>
 /// <param name="fileService">The file service.</param>
 /// <param name="userSession">The user session.</param>
 /// <param name="joinRepository">The join repository.</param>
 public RegisterController(IUserRepository userRepository, IStorage fileService, IUserSession<Domain.Model.User> userSession, IJoinRepository joinRepository)
 {
     _userRepository = userRepository;
     _joinRepository = joinRepository;
     _fileService = fileService;
     _userSession = userSession;
 }
开发者ID:chuckconway,项目名称:the-memorable-moments,代码行数:14,代码来源:RegisterController.cs

示例7: SessionQueryContext

        public SessionQueryContext(IUserSession session)
        {
            if (session == null)
                throw new ArgumentNullException("session");

            this.session = session;
        }
开发者ID:furesoft,项目名称:deveeldb,代码行数:7,代码来源:SessionQueryContext.cs

示例8: ValidateTheCommand

 void ValidateTheCommand(IUserSession userSession, object command)
 {
     foreach (object validator in GetMatchingCommandValidators(command))
     {
         InvokeMethod("Validate", validator, userSession, command);
     }
 }
开发者ID:rsiwady29,项目名称:Starscream,代码行数:7,代码来源:SynchronousCommandDispatcherBase.cs

示例9: GetAvailableRooms

        public IEnumerable<IRoom> GetAvailableRooms(IUserSession session)
        {
            Contract.Requires(session != null, "session is null.");
            Contract.Ensures(Contract.Result<IEnumerable<IRoom>>() != null);

            return default(IEnumerable<IRoom>);
        }
开发者ID:marcel-valdez,项目名称:dot_net_cop_example,代码行数:7,代码来源:IRoomsManagerCodeContract.cs

示例10: BoxFriendPresenter

 public BoxFriendPresenter()
 {
     _friendRepository = new SPKTCore.Core.DataAccess.Impl.FriendRepository();
     _userSession = new SPKTCore.Core.Impl.UserSession();
     _friendService = new FriendService();
     _friendInvite = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository();
 }
开发者ID:SPKT,项目名称:MHX2,代码行数:7,代码来源:BoxFriendPresenter.cs

示例11: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     _usersession = new UserSession();
     _for = new FolderRepository();
     _redirect = new Redirector();
     up = new UploadAvatarPresenter();
 }
开发者ID:SPKT,项目名称:MHX2,代码行数:7,代码来源:CreateAlbum.ascx.cs

示例12: ContentMenuCommandService

 public ContentMenuCommandService(IContentMenuService contentMenuService, IUnitOfWork unitOfWork, ICommandExecutor executor)
 {
   _contentMenuService = contentMenuService;
   _unitOfWork = unitOfWork;
   _executor = executor;
   _userSession = new UserSession();
 }
开发者ID:johnpipo1712,项目名称:Misuka,代码行数:7,代码来源:ContentMenuCommandService.cs

示例13: OrderingHistoryCommandService

 public OrderingHistoryCommandService(IOrderingHistoryService orderingHistoryService, IUnitOfWork unitOfWork, ICommandExecutor executor)
 {
   _orderingHistoryService = orderingHistoryService;
   _unitOfWork = unitOfWork;
   _executor = executor;
   _userSession = new UserSession();
 }
开发者ID:johnpipo1712,项目名称:Misuka,代码行数:7,代码来源:OrderingHistoryCommandService.cs

示例14: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     re = new SPKTCore.Core.Impl.Redirector();
     _userSession = new UserSession();
     if (_userSession.LoggedIn)
         re.GotoHomePage();
 }
开发者ID:SPKT,项目名称:MHX2,代码行数:7,代码来源:Default.aspx.cs

示例15: AlertService

 public AlertService()
 {
     _userSession = new UserSession();
     _alertRepository = new AlertRepository();
     _webContext = new WebContext();
     alert = new Alert();
 }
开发者ID:SPKT,项目名称:MangXaHoi,代码行数:7,代码来源:AlertService.cs


注:本文中的IUserSession类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。