C# Класс Electro.ElectroController

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DumpElections ( ) : IEnumerable
ElectroController ( IEnumerable elections, PrivateKey>.IEnumerable keys, AuthController authController, StatePersister statePersister ) : System
FindElectionForUser ( System.Guid electionId, User user ) : Election
GetFinishedElections ( int top = int.MaxValue ) : IEnumerable
GetUnfinishedPublicElections ( int top = int.MaxValue ) : IEnumerable
NominateCandidate ( System.Guid electionId, User user ) : Election
StartElection ( string electionName, User firstCandidate, bool isPublic, System.DateTime nominateTill, System.DateTime till ) : System.Guid
TryDecryptElectionResultIfFinished ( Election election ) : bool
Vote ( System.Guid electionId, User user, System.Numerics.BigInteger voteArray ) : bool

Приватные методы

Метод Описание
LoadState ( IEnumerable e, PrivateKey>.IEnumerable k ) : void
TryMerge ( System.Numerics.BigInteger voteResults, Vote v ) : System.Numerics.BigInteger[]

Описание методов

DumpElections() публичный Метод

public DumpElections ( ) : IEnumerable
Результат IEnumerable

ElectroController() публичный Метод

public ElectroController ( IEnumerable elections, PrivateKey>.IEnumerable keys, AuthController authController, StatePersister statePersister ) : System
elections IEnumerable
keys PrivateKey>.IEnumerable
authController AuthController
statePersister StatePersister
Результат System

FindElectionForUser() публичный Метод

public FindElectionForUser ( System.Guid electionId, User user ) : Election
electionId System.Guid
user Electro.Model.User
Результат Electro.Model.Election

GetFinishedElections() публичный Метод

public GetFinishedElections ( int top = int.MaxValue ) : IEnumerable
top int
Результат IEnumerable

GetUnfinishedPublicElections() публичный Метод

public GetUnfinishedPublicElections ( int top = int.MaxValue ) : IEnumerable
top int
Результат IEnumerable

NominateCandidate() публичный Метод

public NominateCandidate ( System.Guid electionId, User user ) : Election
electionId System.Guid
user Electro.Model.User
Результат Electro.Model.Election

StartElection() публичный Метод

public StartElection ( string electionName, User firstCandidate, bool isPublic, System.DateTime nominateTill, System.DateTime till ) : System.Guid
electionName string
firstCandidate Electro.Model.User
isPublic bool
nominateTill System.DateTime
till System.DateTime
Результат System.Guid

TryDecryptElectionResultIfFinished() публичный Метод

public TryDecryptElectionResultIfFinished ( Election election ) : bool
election Electro.Model.Election
Результат bool

Vote() публичный Метод

public Vote ( System.Guid electionId, User user, System.Numerics.BigInteger voteArray ) : bool
electionId System.Guid
user Electro.Model.User
voteArray System.Numerics.BigInteger
Результат bool