C# Class GridMoment.UI.WebSite.Controllers.Adapter

Класс для связывания контроллеров и логики приложения.
Show file Open project: sstuteam/Gimble

Public Methods

Method Description
ChangeAvatar ( System.Guid accountId, byte avatar, string mimetype ) : bool
ChangeCityAndCountry ( System.Guid id, string city, string country ) : bool
ChangeMail ( System.Guid id, string mail ) : bool
ChangeName ( System.Guid id, string newName ) : bool
ChangePassword ( System.Guid id, string password ) : bool
CheckAccount ( string name ) : Account
CheckRulesAdmin ( string name ) : bool

Проверить, если действует админ

CheckRulesModer ( string name ) : bool

Проверить, если действует модератер

CreateAdmin ( Account account ) : void
CreateComment ( CommentViewModel comment ) : bool
CreatePost ( Post post ) : bool
CreateUserAndAccount ( Account account ) : bool
DeleteAccount ( string name ) : void
DeleteComment ( System.Guid comid ) : void
GetAccount ( System.Guid accountId ) : Account
GetAccount ( string name ) : Account
GetAllAccounts ( ) : List
GetAllRoles ( ) : string[]
GetAllRolesOfAccounts ( ) : string[]>.Dictionary
GetAvatar ( string name ) : Photo
GetComments ( System.Guid postId ) : List
GetIdByName ( string name ) : System.Guid
GetLikedPost ( string modelName ) : List
GetLikes ( System.Guid postId, System.Guid accountId ) : int>.Dictionary
GetPost ( System.Guid postid ) : Post
GetSHA256 ( string source ) : string
GetSourceOfPost ( System.Guid postId ) : Photo
Init ( ) : void

Инициализация класса логики(Логика будет только одна)

List30Times ( ) : IEnumerable
List7Times ( ) : IEnumerable
ListOfLatestPosts ( ) : List
ListUsersPosts ( string name ) : IEnumerable
RegisterRoles ( ) : bool
SetLike ( System.Guid postId, System.Guid accountId ) : bool
UpdateRole ( System.Guid accountId, int roleCode ) : bool

Private Methods

Method Description
Adapter ( ) : BusinessLogicLayer

закрытый конструктор X-DDDD

Method Details

ChangeAvatar() public static method

public static ChangeAvatar ( System.Guid accountId, byte avatar, string mimetype ) : bool
accountId System.Guid
avatar byte
mimetype string
return bool

ChangeCityAndCountry() public static method

public static ChangeCityAndCountry ( System.Guid id, string city, string country ) : bool
id System.Guid
city string
country string
return bool

ChangeMail() public static method

public static ChangeMail ( System.Guid id, string mail ) : bool
id System.Guid
mail string
return bool

ChangeName() public static method

public static ChangeName ( System.Guid id, string newName ) : bool
id System.Guid
newName string
return bool

ChangePassword() public static method

public static ChangePassword ( System.Guid id, string password ) : bool
id System.Guid
password string
return bool

CheckAccount() public static method

public static CheckAccount ( string name ) : Account
name string
return Entities.Account

CheckRulesAdmin() public static method

Проверить, если действует админ
public static CheckRulesAdmin ( string name ) : bool
name string Имя(использовать User.Identity.Name)
return bool

CheckRulesModer() public static method

Проверить, если действует модератер
public static CheckRulesModer ( string name ) : bool
name string Имя(использовать User.Identity.Name)
return bool

CreateAdmin() public static method

public static CreateAdmin ( Account account ) : void
account Entities.Account
return void

CreateComment() public static method

public static CreateComment ( CommentViewModel comment ) : bool
comment GridMoment.UI.WebSite.Models.CommentViewModel
return bool

CreatePost() public static method

public static CreatePost ( Post post ) : bool
post Entities.Post
return bool

CreateUserAndAccount() public static method

public static CreateUserAndAccount ( Account account ) : bool
account Entities.Account
return bool

DeleteAccount() public static method

public static DeleteAccount ( string name ) : void
name string
return void

DeleteComment() public static method

public static DeleteComment ( System.Guid comid ) : void
comid System.Guid
return void

GetAccount() public static method

public static GetAccount ( System.Guid accountId ) : Account
accountId System.Guid
return Entities.Account

GetAccount() public static method

public static GetAccount ( string name ) : Account
name string
return Entities.Account

GetAllAccounts() public static method

public static GetAllAccounts ( ) : List
return List

GetAllRoles() public static method

public static GetAllRoles ( ) : string[]
return string[]

GetAllRolesOfAccounts() public static method

public static GetAllRolesOfAccounts ( ) : string[]>.Dictionary
return string[]>.Dictionary

GetAvatar() public static method

public static GetAvatar ( string name ) : Photo
name string
return Entities.Photo

GetComments() public static method

public static GetComments ( System.Guid postId ) : List
postId System.Guid
return List

GetIdByName() public static method

public static GetIdByName ( string name ) : System.Guid
name string
return System.Guid

GetLikedPost() public static method

public static GetLikedPost ( string modelName ) : List
modelName string
return List

GetLikes() public static method

public static GetLikes ( System.Guid postId, System.Guid accountId ) : int>.Dictionary
postId System.Guid
accountId System.Guid
return int>.Dictionary

GetPost() public static method

public static GetPost ( System.Guid postid ) : Post
postid System.Guid
return Entities.Post

GetSHA256() public static method

public static GetSHA256 ( string source ) : string
source string
return string

GetSourceOfPost() public static method

public static GetSourceOfPost ( System.Guid postId ) : Photo
postId System.Guid
return Entities.Photo

Init() public static method

Инициализация класса логики(Логика будет только одна)
public static Init ( ) : void
return void

List30Times() public static method

public static List30Times ( ) : IEnumerable
return IEnumerable

List7Times() public static method

public static List7Times ( ) : IEnumerable
return IEnumerable

ListOfLatestPosts() public static method

public static ListOfLatestPosts ( ) : List
return List

ListUsersPosts() public static method

public static ListUsersPosts ( string name ) : IEnumerable
name string
return IEnumerable

RegisterRoles() public static method

public static RegisterRoles ( ) : bool
return bool

SetLike() public static method

public static SetLike ( System.Guid postId, System.Guid accountId ) : bool
postId System.Guid
accountId System.Guid
return bool

UpdateRole() public static method

public static UpdateRole ( System.Guid accountId, int roleCode ) : bool
accountId System.Guid
roleCode int
return bool