本文整理汇总了C#中IRepositoryFactory类的典型用法代码示例。如果您正苦于以下问题:C# IRepositoryFactory类的具体用法?C# IRepositoryFactory怎么用?C# IRepositoryFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IRepositoryFactory类属于命名空间,在下文中一共展示了IRepositoryFactory类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: PropertyViewModel
public PropertyViewModel(IViewModelsFactory<IPropertyValueViewModel> propertyValueVmFactory, IViewModelsFactory<IPropertyAttributeViewModel> attributeVmFactory, ICatalogEntityFactory entityFactory, Property item, catalogModel.Catalog parentCatalog, IRepositoryFactory<ICatalogRepository> repositoryFactory, ObservableCollection<Property> properties)
{
InnerItem = item;
_propertyValueVmFactory = propertyValueVmFactory;
_attributeVmFactory = attributeVmFactory;
_entityFactory = entityFactory;
_properties = properties;
ParentCatalog = parentCatalog;
// _repositoryFactory = repositoryFactory;
ValueAddCommand = new DelegateCommand(RaiseValueAddInteractionRequest);
ValueEditCommand = new DelegateCommand<PropertyValueBase>(RaiseValueEditInteractionRequest, x => x != null);
ValueDeleteCommand = new DelegateCommand<PropertyValueBase>(RaiseValueDeleteInteractionRequest, x => x != null);
AttributeAddCommand = new DelegateCommand(RaiseAttributeAddInteractionRequest);
AttributeEditCommand = new DelegateCommand<PropertyAttribute>(RaiseAttributeEditInteractionRequest, x => x != null);
AttributeDeleteCommand = new DelegateCommand<PropertyAttribute>(RaiseAttributeDeleteInteractionRequest, x => x != null);
CommonConfirmRequest = new InteractionRequest<Confirmation>();
var allValueTypes = (PropertyValueType[])Enum.GetValues(typeof(PropertyValueType));
PropertyTypes = new List<PropertyValueType>(allValueTypes);
PropertyTypes.Sort((x, y) => x.ToString().CompareTo(y.ToString()));
}
开发者ID:gitter-badger,项目名称:vc-community-1.x,代码行数:25,代码来源:PropertyViewModel.cs
示例2: FirstNRequests
/// <summary>
/// Take first N request.
/// </summary>
/// <param name="n">number of requests</param>
public static List<Request> FirstNRequests(IRepositoryFactory factory, int n)
{
return factory.RequestRepository.Get()
.OrderByDescending(r => r.Date)
.Take(n)
.ToList();
}
开发者ID:tazik047,项目名称:PaymentSystem,代码行数:11,代码来源:RequestService.cs
示例3: NotificationServiceTests
public NotificationServiceTests()
{
EmailRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<EmailQueue, Guid>>();
EmailPreferenceRepository = MockRepository.GenerateStub < IRepositoryWithTypedId<EmailPreferences, string>>();
UserIdentity = MockRepository.GenerateStub<IUserIdentity>();
UserRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<User, string>>();
OrderStatusCodeRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<OrderStatusCode, string>>();
ServerLink = MockRepository.GenerateStub<IServerLink>();
QueryRepositoryFactory = MockRepository.GenerateStub<IQueryRepositoryFactory>();
RepositoryFactory = MockRepository.GenerateStub<IRepositoryFactory>();
RepositoryFactory.OrganizationRepository =
MockRepository.GenerateStub<IRepositoryWithTypedId<Organization, string>>();
AdminWorkgroupRepository = MockRepository.GenerateStub<IRepository<AdminWorkgroup>>();
QueryRepositoryFactory.AdminWorkgroupRepository = AdminWorkgroupRepository;
WorkgroupRepository = MockRepository.GenerateStub<IRepository<Workgroup>>();
RepositoryFactory.WorkgroupRepository = WorkgroupRepository;
NotificationService = new NotificationService(EmailRepository, EmailPreferenceRepository, UserRepository, OrderStatusCodeRepository, UserIdentity, ServerLink, QueryRepositoryFactory, RepositoryFactory);
ServerLink.Expect(a => a.Address).Return("FakeHost").Repeat.Any();
ApprovalRepository = MockRepository.GenerateStub<IRepository<Approval>>();
SetupOrderStatusCodes();
}
开发者ID:ucdavis,项目名称:Purchasing,代码行数:25,代码来源:NotificationServiceTestsInit.cs
示例4: MainFulfillmentViewModel
public MainFulfillmentViewModel(
IInventoryHomeViewModel inventoryVm,
IPicklistHomeViewModel picklistVm,
IRmaHomeViewModel rmaVm,
IViewModelsFactory<ICompleteShipmentViewModel> completeShipmentVmFactory,
IRepositoryFactory<IOrderRepository> orderRepositoryFactory,
IOrderService orderService,
IAuthenticationContext authContext)
{
ViewTitle = new ViewTitleBase { Title = "Fulfillment", SubTitle = "FULFILLMENT SERVICE" };
_inventoryHomeVm = inventoryVm;
_inventoryHomeVm.ParentViewModel = this;
_picklistHomeVm = picklistVm;
_picklistHomeVm.ParentViewModel = this;
_rmaHomeVm = rmaVm;
_rmaHomeVm.ParentViewModel = this;
_completeShipmentVmFactory = completeShipmentVmFactory;
_orderRepositoryFactory = orderRepositoryFactory;
_authContext = authContext;
_orderService = orderService;
PopulateTabItems();
CompleteShipmentCommand = new DelegateCommand(RaiseCompleteShipment);
CommonConfirmRequest = new InteractionRequest<Confirmation>();
CommonNotifyRequest = new InteractionRequest<Notification>();
}
开发者ID:karpinskiy,项目名称:vc-community,代码行数:30,代码来源:MainFulfillmentViewModel.cs
示例5: ViewModelFactory
public ViewModelFactory(IRepositoryFactory repositoryFactory, IImportManagerFactory importManagerFactory)
{
repositoryFactory.ThrowIfNull("repositoryFactory");
importManagerFactory.ThrowIfNull("importManagerFactory");
this.repositoryFactory = repositoryFactory;
this.importManagerFactory = importManagerFactory;
}
开发者ID:CookieWookie,项目名称:ais,代码行数:7,代码来源:ViewModelFactory.cs
示例6: TasksModel
public TasksModel(ISourceControl sourceControl, IIssuesTracking issuesTracking, IRepositoryFactory repositoryFactory)
{
_sourceControl = sourceControl;
_issuesTracking = issuesTracking;
_repositoryFactory = repositoryFactory;
LoadModels();
}
开发者ID:Celdorfpwn,项目名称:ASAP,代码行数:7,代码来源:TasksModel.cs
示例7: ConfigSetTask
public ConfigSetTask(IRepositoryFactory repositoryFactory, IEnvironmentTasks environmentTasks)
{
this.cacheController = cacheController;
this.environmentTasks = environmentTasks;
Repository = repositoryFactory.GetRepository();
Repository.SavingChanges += SavingChanges;
}
开发者ID:JonasSyrstad,项目名称:Stardust,代码行数:7,代码来源:ConfigSetTask.cs
示例8: Create
public static GenotypingViewModel Create(IRepositoryFactory repositoryFactory, User user, JobType jobType = null, GenotypingPostModel postModel = null)
{
var viewModel = new GenotypingViewModel()
{
JobType = jobType,
JobTypes = jobType == null ? repositoryFactory.JobTypeRepository.Queryable.Where(a => a.Genotyping).ToList() : new List<JobType>(),
PostModel = postModel ?? new GenotypingPostModel() {NumPlates = 1}
};
if (jobType != null)
{
var rid = postModel != null && postModel.RechargeAccount != null ? postModel.RechargeAccount.Id : -1;
viewModel.RechargeAccounts = new SelectList(user.RechargeAccounts, "Id", "AccountNum", rid);
var pts = new List<SelectListItem>();
pts.Add(new SelectListItem() { Value = ((int)Core.Resources.PlateTypes.NinetySix).ToString(), Text = EnumUtility.GetEnumDescription(Core.Resources.PlateTypes.NinetySix) });
pts.Add(new SelectListItem() { Value = ((int)Core.Resources.PlateTypes.ThreeEightyFour).ToString(), Text = EnumUtility.GetEnumDescription(Core.Resources.PlateTypes.ThreeEightyFour) });
viewModel.PlateTypes = new SelectList(pts, "Value", "Text");
var did = postModel != null && postModel.Dyes != null ? postModel.Dyes : new List<int>();
viewModel.Dyes = new MultiSelectList(repositoryFactory.DyeRepository.Queryable.Where(a => a.Genotyping), "Id", "Name", did);
}
return viewModel;
}
开发者ID:ucdavis,项目名称:CAESGenome,代码行数:25,代码来源:GenotypingViewModel.cs
示例9: UserService
public UserService(IRepositoryFactory _repositoryFactory, IHraSessionManager hraSessionManger)
{
this._repositoryFactory = _repositoryFactory;
_hraSessionManager = hraSessionManger;
sample = new SampleData();
}
开发者ID:mahitosh,项目名称:HRA4,代码行数:7,代码来源:UserService.cs
示例10: WorkgroupServiceTests
public WorkgroupServiceTests()
{
AutomapperConfig.Configure();
VendorRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<Vendor, string>>();
VendorAddressRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<VendorAddress, Guid>>();
UserRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<User, string>>();
EmailPreferencesRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<EmailPreferences, string>>();
WorkgroupPermissionRepository = MockRepository.GenerateStub<IRepository<WorkgroupPermission>>();
WorkgroupRepository = MockRepository.GenerateStub<IRepository<Workgroup>>();
OrganizationRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<Organization, string>>();
SearchService = MockRepository.GenerateStub<IDirectorySearchService>();
RepositoryFactory = MockRepository.GenerateStub<IRepositoryFactory>();
RepositoryFactory.RoleRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<Role, string>>();
RepositoryFactory.WorkgroupPermissionRepository = WorkgroupPermissionRepository;
RepositoryFactory.AccountRepository = MockRepository.GenerateStub<IRepositoryWithTypedId<Account, string>>();
QueryRepositoryFactory = MockRepository.GenerateStub<IQueryRepositoryFactory>();
UserIdentity = MockRepository.GenerateStub<IUserIdentity>();
QueryRepositoryFactory.RelatatedWorkgroupsRepository =
MockRepository.GenerateStub<IRepository<RelatedWorkgroups>>();
WorkgroupService = new WorkgroupService(VendorRepository,
VendorAddressRepository,
UserRepository,
EmailPreferencesRepository,
WorkgroupPermissionRepository,
WorkgroupRepository,
OrganizationRepository,
SearchService,
RepositoryFactory, QueryRepositoryFactory, UserIdentity);
}
开发者ID:ucdavis,项目名称:Purchasing,代码行数:31,代码来源:WorkgroupServiceTests.cs
示例11: DisplayTemplateOverviewStepViewModel
public DisplayTemplateOverviewStepViewModel(
IRepositoryFactory<IAppConfigRepository> repositoryFactory,
IAppConfigEntityFactory entityFactory,
DisplayTemplateMapping item)
: base(null, repositoryFactory, entityFactory, null, null, item)
{
}
开发者ID:Wdovin,项目名称:vc-community,代码行数:7,代码来源:CreateDisplayTemplateViewModel.cs
示例12: TableStorageContextFactory
public TableStorageContextFactory(
ICloudStorageServices cloudStorageServices,
IRepositoryFactory repositoryFactory)
{
this.cloudStorageServices = cloudStorageServices;
this.repositoryFactory = repositoryFactory;
}
开发者ID:aenmeyk,项目名称:BrainThud,代码行数:7,代码来源:TableStorageContextFactory.cs
示例13: HomeController
public HomeController(IRepositoryFactory repositoryFactory, IMapDataService mapService)
{
Contract.Requires(repositoryFactory != null);
Contract.Requires(mapService != null);
_repositoryFactory = repositoryFactory;
_mapService = mapService;
}
开发者ID:hankbeasley,项目名称:hoahome,代码行数:7,代码来源:HomeController.cs
示例14: ImportService
public ImportService(IImportRepository importRepository, IAssetService blobProvider, ICatalogRepository catalogRepository, IOrderRepository orderRepository, IAppConfigRepository appConfigRepository, IRepositoryFactory<IAppConfigRepository> appConfigRepositoryFactory)
{
_orderRepository = orderRepository;
_catalogRepository = catalogRepository;
_importJobRepository = importRepository;
_appConfigRepository = appConfigRepository;
_appConfigRepositoryFactory = appConfigRepositoryFactory;
_assetProvider = blobProvider;
_entityImporters = new List<IEntityImporter>
{
new ItemImporter() { Name = "Product"},
new ItemImporter() { Name = "Sku"},
new ItemImporter() { Name = "Bundle"},
new ItemImporter() { Name = "DynamicKit"},
new ItemImporter() { Name = "Package"},
new PriceImporter(_catalogRepository),
new AssociationImporter(_catalogRepository),
new RelationImporter(_catalogRepository),
new CategoryImporter(),
new LocalizationImporter(),
new TaxValueImporter(),
new ItemAssetImporter(),
new TaxCategoryImporter(),
new JurisdictionImporter(),
new JurisdictionGroupImporter(),
new SeoImporter()
};
_importResults = new Dictionary<string, ImportResult>();
}
开发者ID:Wdovin,项目名称:vc-community,代码行数:31,代码来源:ImportService.cs
示例15: SynchronizationService
public SynchronizationService(IRepositoryFactory repositoryFactory)
{
_repositoryFactory = repositoryFactory;
_resolver.Add(SynchronizationType.Get, Get);
_resolver.Add(SynchronizationType.Post, Post);
_resolver.Add(SynchronizationType.Both, Both);
}
开发者ID:vynogradskyi,项目名称:EarnIt,代码行数:7,代码来源:SynchronizationService.cs
示例16: EventService
public EventService(IRepositoryFactory factory)
{
_personPersonRepo = factory.GetRepository<Person>();
_gameRepository = factory.GetRepository<Game>();
_foodRepository = factory.GetRepository<FoodItem>();
_invitationRepository = factory.GetRepository<PendingInvitation>();
}
开发者ID:sbutler-nerdery,项目名称:my-event-planner,代码行数:7,代码来源:EventService.cs
示例17: TreeVirtualCatalogViewModel
public TreeVirtualCatalogViewModel(
IViewModelsFactory<ITreeCategoryViewModel> vmFactory,
IViewModelsFactory<IVirtualCatalogViewModel> virtualCatalogVmFactory,
IViewModelsFactory<ICatalogDeleteViewModel> catalogDeleteVmFactory,
CatalogBase item,
IRepositoryFactory<ICatalogRepository> repositoryFactory,
IAuthenticationContext authContext,
INavigationManager navigationManager)
: base(repositoryFactory, authContext)
{
InnerItem = item;
_vmFactory = vmFactory;
_catalogDeleteVmFactory = catalogDeleteVmFactory;
EmbeddedHierarchyEntry = this;
ViewTitle = new ViewTitleBase
{
SubTitle = "VIRTUAL CATALOG",
Title = (item != null && !string.IsNullOrEmpty(item.Name)) ? item.Name : ""
};
OpenItemCommand = new DelegateCommand(() =>
{
if (NavigationData == null)
{
var editVM = virtualCatalogVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("item", InnerItem)
, new KeyValuePair<string, object>("parentTreeVM", this));
NavigationData = ((IClosable)editVM).NavigationData;
}
navigationManager.Navigate(NavigationData);
});
}
开发者ID:karpinskiy,项目名称:vc-community,代码行数:31,代码来源:TreeVirtualCatalogViewModel.cs
示例18: TreeCatalogViewModel
public TreeCatalogViewModel(
IViewModelsFactory<ICatalogViewModel> vmFactory,
catalogModel.Catalog item,
IRepositoryFactory<ICatalogRepository> repositoryFactory,
IAuthenticationContext authContext,
INavigationManager navigationManager,
IViewModelsFactory<ICatalogDeleteViewModel> catalogDeleteVmFactory,
IViewModelsFactory<ITreeCategoryViewModel> treeCategoryVmFactory,
IDataManagementService exportService)
: base(repositoryFactory, authContext)
{
InnerItem = item;
EmbeddedHierarchyEntry = this;
_catalogDeleteVmFactory = catalogDeleteVmFactory;
_treeCategoryVmFactory = treeCategoryVmFactory;
_exportService = exportService;
OpenItemCommand = new DelegateCommand(() =>
{
if (NavigationData == null)
{
var editVM = vmFactory.GetViewModelInstance(new KeyValuePair<string, object>("item", InnerItem)
, new KeyValuePair<string, object>("parentTreeVM", this));
NavigationData = ((IClosable)editVM).NavigationData;
}
navigationManager.Navigate(NavigationData);
});
ExportItemCommand = new DelegateCommand(() => RaiseExportItemCommand());
}
开发者ID:gitter-badger,项目名称:vc-community-1.x,代码行数:31,代码来源:TreeCatalogViewModel.cs
示例19: ConfigurationWizardViewModel
public ConfigurationWizardViewModel(
Project item,
IRepositoryFactory<IProjectRepository> projectRepositoryFactory,
IViewModelsFactory<IProjectLocationStepViewModel> projectLocationStepVmFactory,
IViewModelsFactory<IDatabaseSettingsStepViewModel> databaseSettingsStepVmFactory,
IViewModelsFactory<ISearchSettingsStepViewModel> searchSettingsStepVmFactory,
IViewModelsFactory<IConfigurationViewModel> configurationVmFactory,
IViewModelsFactory<IConfirmationStepViewModel> confirmationStepVmFactory,
NavigationManager navigationManager
)
{
_item = item;
_projectRepositoryFactory = projectRepositoryFactory;
_navigationManager = navigationManager;
// initializing step instances
_confirmationViewModel = confirmationStepVmFactory.GetViewModelInstance();
var confirmParam = new KeyValuePair<string, object>("confirmationViewModel", _confirmationViewModel);
_searchSettingsStepViewModel = searchSettingsStepVmFactory.GetViewModelInstance(confirmParam);
var searchParam = new KeyValuePair<string, object>("searchViewModel", _searchSettingsStepViewModel);
_databaseSettingsStepViewModel = databaseSettingsStepVmFactory.GetViewModelInstance(confirmParam);
var dbParam = new KeyValuePair<string, object>("databaseViewModel", _databaseSettingsStepViewModel);
_projectLocationStepViewModel = projectLocationStepVmFactory.GetViewModelInstance(confirmParam, searchParam, dbParam);
var locationParam = new KeyValuePair<string, object>("projectLocationViewModel", _projectLocationStepViewModel);
_configurationViewModel = configurationVmFactory.GetViewModelInstance(locationParam, dbParam, searchParam);
Initialize();
RegisterWizardSteps();
}
开发者ID:karpinskiy,项目名称:vc-community,代码行数:33,代码来源:ConfigurationWizardViewModel.cs
示例20: CustomerDetailViewModel
public CustomerDetailViewModel(ISecurityService securityService, IViewModelsFactory<IPhoneNumberDialogViewModel> phoneVmFactory, IViewModelsFactory<IEmailDialogViewModel> emailVmFactory, IViewModelsFactory<ICreateUserDialogViewModel> wizardUserVmFactory, IViewModelsFactory<IAddressDialogViewModel> addressVmFactory, ICustomerEntityFactory entityFactory,
IAuthenticationContext authContext, CustomersDetailViewModel parentViewModel, Contact innerContact,
ICustomerRepository customerRepository, IRepositoryFactory<ISecurityRepository> securityRepositoryFactory,
IRepositoryFactory<ICountryRepository> countryRepositoryFactory, IRepositoryFactory<IOrderRepository> orderRepositoryFactory, ILoginViewModel loginViewModel)
{
_securityService = securityService;
_loginViewModel = loginViewModel;
_parentViewModel = parentViewModel;
_authContext = authContext;
_customerRepository = customerRepository;
_orderRepositoryFactory = orderRepositoryFactory;
_securityRepositoryFactory = securityRepositoryFactory;
_countryRepositoryFactory = countryRepositoryFactory;
_entityFactory = entityFactory;
_addressVmFactory = addressVmFactory;
_wizardUserVmFactory = wizardUserVmFactory;
_emailVmFactory = emailVmFactory;
_phoneVmFactory = phoneVmFactory;
_fileDialogService = new FileDialogService();
InnerItem = innerContact;
InnerItem.PropertyChanged += _innerContact_PropertyChanged;
CommandsInit();
RequestInit();
CollectionInit();
HasCurrentContactLoginAndSuspendAccessCheck();
}
开发者ID:karpinskiy,项目名称:vc-community,代码行数:30,代码来源:CustomerDetailViewModel.cs
注:本文中的IRepositoryFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论