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

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

Méthodes publiques

Méthode 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

Méthode Description
Adapter ( ) : BusinessLogicLayer

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

Method Details

ChangeAvatar() public static méthode

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

ChangeCityAndCountry() public static méthode

public static ChangeCityAndCountry ( System.Guid id, string city, string country ) : bool
id System.Guid
city string
country string
Résultat bool

ChangeMail() public static méthode

public static ChangeMail ( System.Guid id, string mail ) : bool
id System.Guid
mail string
Résultat bool

ChangeName() public static méthode

public static ChangeName ( System.Guid id, string newName ) : bool
id System.Guid
newName string
Résultat bool

ChangePassword() public static méthode

public static ChangePassword ( System.Guid id, string password ) : bool
id System.Guid
password string
Résultat bool

CheckAccount() public static méthode

public static CheckAccount ( string name ) : Account
name string
Résultat Entities.Account

CheckRulesAdmin() public static méthode

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

CheckRulesModer() public static méthode

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

CreateAdmin() public static méthode

public static CreateAdmin ( Account account ) : void
account Entities.Account
Résultat void

CreateComment() public static méthode

public static CreateComment ( CommentViewModel comment ) : bool
comment GridMoment.UI.WebSite.Models.CommentViewModel
Résultat bool

CreatePost() public static méthode

public static CreatePost ( Post post ) : bool
post Entities.Post
Résultat bool

CreateUserAndAccount() public static méthode

public static CreateUserAndAccount ( Account account ) : bool
account Entities.Account
Résultat bool

DeleteAccount() public static méthode

public static DeleteAccount ( string name ) : void
name string
Résultat void

DeleteComment() public static méthode

public static DeleteComment ( System.Guid comid ) : void
comid System.Guid
Résultat void

GetAccount() public static méthode

public static GetAccount ( System.Guid accountId ) : Account
accountId System.Guid
Résultat Entities.Account

GetAccount() public static méthode

public static GetAccount ( string name ) : Account
name string
Résultat Entities.Account

GetAllAccounts() public static méthode

public static GetAllAccounts ( ) : List
Résultat List

GetAllRoles() public static méthode

public static GetAllRoles ( ) : string[]
Résultat string[]

GetAllRolesOfAccounts() public static méthode

public static GetAllRolesOfAccounts ( ) : string[]>.Dictionary
Résultat string[]>.Dictionary

GetAvatar() public static méthode

public static GetAvatar ( string name ) : Photo
name string
Résultat Entities.Photo

GetComments() public static méthode

public static GetComments ( System.Guid postId ) : List
postId System.Guid
Résultat List

GetIdByName() public static méthode

public static GetIdByName ( string name ) : System.Guid
name string
Résultat System.Guid

GetLikedPost() public static méthode

public static GetLikedPost ( string modelName ) : List
modelName string
Résultat List

GetLikes() public static méthode

public static GetLikes ( System.Guid postId, System.Guid accountId ) : int>.Dictionary
postId System.Guid
accountId System.Guid
Résultat int>.Dictionary

GetPost() public static méthode

public static GetPost ( System.Guid postid ) : Post
postid System.Guid
Résultat Entities.Post

GetSHA256() public static méthode

public static GetSHA256 ( string source ) : string
source string
Résultat string

GetSourceOfPost() public static méthode

public static GetSourceOfPost ( System.Guid postId ) : Photo
postId System.Guid
Résultat Entities.Photo

Init() public static méthode

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

List30Times() public static méthode

public static List30Times ( ) : IEnumerable
Résultat IEnumerable

List7Times() public static méthode

public static List7Times ( ) : IEnumerable
Résultat IEnumerable

ListOfLatestPosts() public static méthode

public static ListOfLatestPosts ( ) : List
Résultat List

ListUsersPosts() public static méthode

public static ListUsersPosts ( string name ) : IEnumerable
name string
Résultat IEnumerable

RegisterRoles() public static méthode

public static RegisterRoles ( ) : bool
Résultat bool

SetLike() public static méthode

public static SetLike ( System.Guid postId, System.Guid accountId ) : bool
postId System.Guid
accountId System.Guid
Résultat bool

UpdateRole() public static méthode

public static UpdateRole ( System.Guid accountId, int roleCode ) : bool
accountId System.Guid
roleCode int
Résultat bool