protected MessageMetadataBase(ICommentOptions options, IMirrativSiteOptions siteOptions) { _options = options; _siteOptions = siteOptions; options.PropertyChanged += Options_PropertyChanged; siteOptions.PropertyChanged += SiteOptions_PropertyChanged; }
public MirrativCommentViewModel(ICommentOptions options, IMirrativSiteOptions siteOptions, Message message, bool isFirstComment, ICommentProvider commentProvider, IUser user) : base(options, user, commentProvider, isFirstComment) { MessageType = message.Type; _siteOptions = siteOptions; Id = message.Id; UserId = message.UserId; PostTime = Tools.UnixTime2DateTime(message.CreatedAt).ToString("HH:mm:ss"); var name = new List <IMessagePart> { MessagePartFactory.CreateMessageText(message.Username) }; user.Name = name; var comment = message.Comment; if (siteOptions.NeedAutoSubNickname && message.Type == MessageType.Comment) { var nick = ExtractNickname(comment); if (!string.IsNullOrEmpty(nick)) { user.Nickname = nick; } } NameItemsInternal = name; MessageItems = new List <IMessagePart> { MessagePartFactory.CreateMessageText(comment) }; Init(); }
public ItemMessageMetadata(IMirrativItem item, ICommentOptions options, IMirrativSiteOptions siteOptions, IUser user, ICommentProvider cp) : base(options, siteOptions) { _item = item; User = user; CommentProvider = cp; user.PropertyChanged += User_PropertyChanged; }
public DummyImpl(IDataServer server, string input, ILogger logger, IMirrativSiteOptions siteOptions, MessageProvider2 p1, MetadataProvider2 p2) { _server = server; _input = input; _logger = logger; _siteOptions = siteOptions; _p1 = p1; _p2 = p2; }
public MetadataProvider(IDataServer server, IMirrativSiteOptions siteOptions, string liveId) { _server = server; _siteOptions = siteOptions; _liveId = liveId; }
public CommentMessageMetadata(IMirrativComment comment, ICommentOptions options, IMirrativSiteOptions siteOptions, IUser user, ICommentProvider cp, bool isFirstComment) : base(options, siteOptions) { User = user; CommentProvider = cp; _isFirstComment = isFirstComment; user.PropertyChanged += User_PropertyChanged; }
public JoinMessageMetadata(IMirrativJoinRoom join, ICommentOptions options, IMirrativSiteOptions siteOptions, IUser user, ICommentProvider cp) : base(options, siteOptions) { User = user; CommentProvider = cp; }
protected internal DisconnectedMessageMetadata(IMirrativDisconnected disconnected, ICommentOptions options, IMirrativSiteOptions siteOptions) : base(options, siteOptions) { }
public MetadataProvider2(IDataServer server, IMirrativSiteOptions siteOptions) { _server = server; _siteOptions = siteOptions; }