C# 클래스 Electro.ElectroController

파일 보기 프로젝트 열기: HackerDom/ructfe-2015 1 사용 예제들

공개 메소드들

메소드 설명
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