本文整理汇总了C#中IPersonRepository类的典型用法代码示例。如果您正苦于以下问题:C# IPersonRepository类的具体用法?C# IPersonRepository怎么用?C# IPersonRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPersonRepository类属于命名空间,在下文中一共展示了IPersonRepository类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PersonRepositoryTests
/// <summary>
/// Initializes a new instance of the <see cref="PersonRepositoryTests" /> class.
/// </summary>
public PersonRepositoryTests()
{
this.httpClientHelper = new Mock<IHttpClientHelper>();
DataAccess.Dependencies.Register();
DIContainer.Instance.RegisterInstance<IHttpClientHelper>(this.httpClientHelper.Object);
this.personRepository = DIContainer.Instance.Resolve<IPersonRepository>();
}
示例2: GvaNomController
public GvaNomController(
IUnitOfWork unitOfWork,
ILotRepository lotRepository,
IApplicationRepository applicationRepository,
IPersonRepository personRepository,
IAircraftRepository aircraftRepository,
IAirportRepository airportRepository,
IEquipmentRepository equipmentRepository,
IOrganizationRepository organizationRepository,
ICaseTypeRepository caseTypeRepository,
INomRepository nomRepository,
IStageRepository stageRepository,
IExaminationSystemRepository examinationSystemRepository,
IAircraftRegistrationRepository aircraftRegistrationRepository,
IEnumerable<IDataGenerator> dataGenerators)
{
this.unitOfWork = unitOfWork;
this.lotRepository = lotRepository;
this.applicationRepository = applicationRepository;
this.personRepository = personRepository;
this.aircraftRepository = aircraftRepository;
this.airportRepository = airportRepository;
this.equipmentRepository = equipmentRepository;
this.organizationRepository = organizationRepository;
this.caseTypeRepository = caseTypeRepository;
this.nomRepository = nomRepository;
this.stageRepository = stageRepository;
this.examinationSystemRepository = examinationSystemRepository;
this.aircraftRegistrationRepository = aircraftRegistrationRepository;
this.dataGenerators = dataGenerators;
}
示例3: PersonsController
public PersonsController(
IUnitOfWork unitOfWork,
ILotRepository lotRepository,
IPersonRepository personRepository,
IApplicationRepository applicationRepository,
IApplicationStageRepository applicationStageRepository,
ICaseTypeRepository caseTypeRepository,
INomRepository nomRepository,
IFileRepository fileRepository,
IPersonDocumentRepository personDocumentRepository,
ILotEventDispatcher lotEventDispatcher,
UserContext userContext)
{
this.unitOfWork = unitOfWork;
this.lotRepository = lotRepository;
this.personRepository = personRepository;
this.applicationRepository = applicationRepository;
this.applicationStageRepository = applicationStageRepository;
this.caseTypeRepository = caseTypeRepository;
this.nomRepository = nomRepository;
this.fileRepository = fileRepository;
this.personDocumentRepository = personDocumentRepository;
this.lotEventDispatcher = lotEventDispatcher;
this.userContext = userContext;
}
示例4: ApplicationsController
public ApplicationsController(
IUnitOfWork unitOfWork,
ILotRepository lotRepository,
IPersonRepository personRepository,
IOrganizationRepository organizationRepository,
IAircraftRepository aircraftRepository,
IAirportRepository airportRepository,
IEquipmentRepository equipmentRepository,
IDocRepository docRepository,
IApplicationRepository applicationRepository,
INomRepository nomRepository,
IFileRepository fileRepository,
IExaminationSystemRepository examinationSystemRepository,
ILotEventDispatcher lotEventDispatcher,
UserContext userContext)
{
this.unitOfWork = unitOfWork;
this.lotRepository = lotRepository;
this.personRepository = personRepository;
this.organizationRepository = organizationRepository;
this.aircraftRepository = aircraftRepository;
this.airportRepository = airportRepository;
this.equipmentRepository = equipmentRepository;
this.docRepository = docRepository;
this.applicationRepository = applicationRepository;
this.nomRepository = nomRepository;
this.examinationSystemRepository = examinationSystemRepository;
this.fileRepository = fileRepository;
this.lotEventDispatcher = lotEventDispatcher;
this.userContext = userContext;
}
示例5: SetupPersonModelForTesting
public void SetupPersonModelForTesting()
{
AutomapperConfiguration.Configure();
_personRepository = Mock.Create<IPersonRepository>();
_personModel = new PersonModel(_personRepository);
}
示例6: PersonDetailsViewModel
public PersonDetailsViewModel(
IEventAggregator eventAggregator,
IPersonRepository repository,
IApplicationCommands applicationCommands,
IRegionManager regionManager)
{
this.regionManager = regionManager;
this.eventAggregator = eventAggregator;
this.repository = repository;
this.SaveConfirmation = new InteractionRequest<IConfirmation>();
;
eventAggregator.GetEvent<PersonSelectionEvent>()
.Subscribe(this.OnPersonSelected, ThreadOption.PublisherThread);
this.CreateNewCommand = new DelegateCommand(() => this.SelectedPerson = new Person());
applicationCommands.NewCommand.RegisterCommand(this.CreateNewCommand);
this.SaveCommand = new DelegateCommand(this.Save, this.CanSave);
applicationCommands.SaveCommand.RegisterCommand(this.SaveCommand);
this.GenerateNumbersCommand = new DelegateCommand(this.GenerateNumbers);
this.ShowAnalyzationCommand = new DelegateCommand(this.ShowAnalyzation);
}
示例7: PersonFacade
public PersonFacade(ISessionFactoryHelper sessionFactoryHelper, IPersonRepository personRepository, ICommunicationRepository communicationRepository)
{
_sessionFactoryHelper = sessionFactoryHelper;
_sessionFactory = _sessionFactoryHelper.CreateSessionFactory();
_personRepository = personRepository;
_communicationRepository = communicationRepository;
}
示例8: PersonListPageViewModel
public PersonListPageViewModel(IPersonRepository personRepository, INavigationService navService, IEventAggregator eventAggregator) {
_personRepository = personRepository;
_navService = navService;
_eventAggregator = eventAggregator;
NavCommand = new DelegateCommand<Person>(OnNavCommand);
PersonDetailNavCommand = new DelegateCommand(() => _navService.Navigate("PersonDetail", 0));
}
示例9: PersonService
public PersonService(IPersonRepository pr, IPersonFactory pf, IUserRepository ur, IUserFactory uf)
{
this.PersonRepository = pr;
this.PersonFactory = pf;
this.UserRepository = ur;
this.UserFactory = uf;
}
示例10: CompanyBusinessLogic
public CompanyBusinessLogic(ICompanyRepository repository, IEmployeeRepository empRepository, IProjectRepository projectRepository, IPersonRepository personRepository)
{
_repository = repository;
_empRepository = empRepository;
_projectRepository = projectRepository;
_personRepository = personRepository;
}
示例11: InjectorIoC
/// <summary>
/// ATR: Constructor sobrecargado, permite parametrizar una instancia
/// inyectada, sin una clase concreta.
/// </summary>
/// <param name="injectedInstance"></param>
public InjectorIoC(IPersonRepository injectedInstance)
{
if (!object.ReferenceEquals(injectedInstance, default(object)))
{
this.injectedInstance = injectedInstance;
}
}
示例12: UserService
public UserService(IUserRepository userRepository, IPersonRepository personRepository, IPersonDetailMapper personDetailMapper, IManageUserMapper manageUserMapper)
{
_userRepository = userRepository;
_personRepository = personRepository;
_personDetailMapper = personDetailMapper;
_manageUserMapper = manageUserMapper;
}
示例13: PersonController
public PersonController(IPersonRepository personRepository, IMapper mapper)
{
if (personRepository == null) throw new ArgumentNullException(nameof(personRepository));
if (mapper == null) throw new ArgumentNullException(nameof(mapper));
_personRepository = personRepository;
_mapper = mapper;
}
示例14: PersonListViewModel
public PersonListViewModel(IScreen hostScreen, IPersonRepository personRepository = null)
{
HostScreen = hostScreen;
personRepository = personRepository ?? new PersonRepository();
Persons = new ReactiveList<PersonItemViewModel>();
NewPersonCommand = new ReactiveCommand(null);
NewPersonCommand.RegisterAsyncAction(_ => { }).Subscribe(_ => HostScreen.Router.Navigate.Execute(new PersonAddViewModel(HostScreen)));
RefreshCommand = new ReactiveCommand(null);
var refresh = RefreshCommand.RegisterAsync<List<Person>>(_ => Observable.Start(() => personRepository.RetrievePersonsAsync().
Result));
refresh.Subscribe(list =>
{
using (Persons.SuppressChangeNotifications())
{
Persons.Clear();
Persons.AddRange(personRepository.RetrievePersonsAsync().
Result.Select(d => new PersonItemViewModel(d.FirstName,
d.LastName,
d.Age)));
}
});
MessageBus.Current.Listen<Person>().
Subscribe(p =>
{
personRepository.AddPerson(p);
RefreshCommand.Execute(null);
});
}
示例15: PersonController
public PersonController(IPersonRepository personRepository, IMappingEngine mappingEngine)
{
if (personRepository == null) throw new ArgumentNullException(nameof(personRepository));
if (mappingEngine == null) throw new ArgumentNullException(nameof(mappingEngine));
this._personRepository = personRepository;
this._mappingEngine = mappingEngine;
}