コード例 #1
0
 public MessageFormViewModel(int id, Message mess)
 {
     userRep = new UserRepository();
     messageRep = new MessageRepository();
     channelRep = new ChannelRepository();
     chat = channelRep.showChatroom(id);
     user = userRep.getOwner(channelRep.showChatroom(id));
     messes = messageRep.showChatroomMessages(id).ToList();
 }
コード例 #2
0
ファイル: AdminController.cs プロジェクト: jtkarlsen/webchat
        private MessageFormViewModel view; //Meldingenes ViewModel

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Konstruktør som oppretter de forskjellige repositoriene slik at 
        /// kontrolleren kan benytte seg av disse
        /// </summary>
        public AdminController()
        {
            messageRep = new MessageRepository();
            userRep = new UserRepository();
            channelRep = new ChannelRepository();
            try
            {
                config = new AdminRepository(User.Identity.Name);
            }
            catch (NullReferenceException e)
            {

            }
        }
コード例 #3
0
        private MessageFormViewModel view; //Meldingenes ViewModel

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Konstruktør
        /// </summary>
        public ChannelController()
        {
            channelRep = new ChannelRepository();
            messRep = new MessageRepository();
            userRep = new UserRepository();
        }
コード例 #4
0
ファイル: UserController.cs プロジェクト: jtkarlsen/webchat
 /// <summary>
 /// Konstruktør
 /// </summary>
 public UserController()
 {
     userRep = new UserRepository();
     messageRep = new MessageRepository();
 }
コード例 #5
0
 /// <summary>
 /// Kontruktør
 /// </summary>
 public MessageController()
 {
     messageRep = new MessageRepository();
     userRep = new UserRepository();
 }