[reorg]
This commit is contained in:
parent
730ee00743
commit
02160f1eaf
26 changed files with 129 additions and 132 deletions
7
src/Yavsc.Abstract/Chat/ChatRoomAccessLevel.cs
Normal file
7
src/Yavsc.Abstract/Chat/ChatRoomAccessLevel.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
namespace Yavsc.Abstract.Chat
|
||||
{
|
||||
public enum ChatRoomAccessLevel: int {
|
||||
Op=1,
|
||||
HalfOp=2
|
||||
}
|
||||
}
|
||||
16
src/Yavsc.Abstract/Chat/IChatRoom.cs
Normal file
16
src/Yavsc.Abstract/Chat/IChatRoom.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
12
src/Yavsc.Abstract/Chat/IChatRoomAccess.cs
Normal file
12
src/Yavsc.Abstract/Chat/IChatRoomAccess.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
namespace Yavsc.Abstract.Chat
|
||||
{
|
||||
|
||||
public interface IChatRoomAccess
|
||||
{
|
||||
long Id { get; }
|
||||
|
||||
ChatRoomAccessLevel Level { get; set; }
|
||||
|
||||
string UserId { get; }
|
||||
}
|
||||
}
|
||||
15
src/Yavsc.Abstract/Chat/IChatUserInfo.cs
Normal file
15
src/Yavsc.Abstract/Chat/IChatUserInfo.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
10
src/Yavsc.Abstract/Chat/IConnection.cs
Normal file
10
src/Yavsc.Abstract/Chat/IConnection.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
namespace Yavsc.Abstract.Chat
|
||||
{
|
||||
public interface IConnection
|
||||
{
|
||||
string ConnectionId { get; set; }
|
||||
string UserAgent { get; set; }
|
||||
bool Connected { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue