This commit is contained in:
Paul Schneider 2019-05-07 14:01:23 +01:00
commit 02160f1eaf
26 changed files with 129 additions and 132 deletions

View file

@ -0,0 +1,7 @@
namespace Yavsc.Abstract.Chat
{
public enum ChatRoomAccessLevel: int {
Op=1,
HalfOp=2
}
}

View file

@ -0,0 +1,16 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Abstract.Chat
{
public interface IChatRoom<TMod> where TMod : IChatRoomAccess
{
[RegularExpression(@"^#?[a-zA-Z0-9'-']{3,10}$", ErrorMessage = "chan name cannot be validated.")]
string Name { get; }
[RegularExpression(@"^#?[a-zA-Z0-9'-']{3,10}$", ErrorMessage = "topic cannot be validated.")]
string Topic { get ; set; }
List<TMod> Administration { get; }
}
}

View file

@ -0,0 +1,12 @@
namespace Yavsc.Abstract.Chat
{
public interface IChatRoomAccess
{
long Id { get; }
ChatRoomAccessLevel Level { get; set; }
string UserId { get; }
}
}

View file

@ -0,0 +1,15 @@
namespace Yavsc.Abstract.Streaming
{
public interface IChatUserInfo
{
IConnection[] Connections { get; set; }
string UserId { get; set; }
string UserName { get; set; }
string Avatar { get; set; }
string[] Roles { get; set; }
}
}

View file

@ -0,0 +1,10 @@
namespace Yavsc.Abstract.Chat
{
public interface IConnection
{
string ConnectionId { get; set; }
string UserAgent { get; set; }
bool Connected { get; set; }
}
}