• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IServiceFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IServiceFactory的典型用法代码示例。如果您正苦于以下问题:C# IServiceFactory类的具体用法?C# IServiceFactory怎么用?C# IServiceFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IServiceFactory类属于命名空间,在下文中一共展示了IServiceFactory类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ServiceSynchronizationService

 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceSynchronizationService"/> class.
 /// </summary>
 /// <param name="medicalProcedureTranslator">The medical procedure translator.</param>
 /// <param name="serviceRepository">The service repository.</param>
 /// <param name="serviceFactory">The service factory.</param>
 /// <param name="lookupValueRepository">The lookup value repository.</param>
 public ServiceSynchronizationService(IMedicalProcedureTranslator medicalProcedureTranslator, IServiceRepository serviceRepository, IServiceFactory serviceFactory, ILookupValueRepository lookupValueRepository)
 {
     _medicalProcedureTranslator = medicalProcedureTranslator;
     _serviceRepository = serviceRepository;
     _serviceFactory = serviceFactory;
     _lookupValueRepository = lookupValueRepository;
 }
开发者ID:divyang4481,项目名称:REM,代码行数:14,代码来源:ServiceSynchronizationService.cs


示例2: ManageDeliveryNotesViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="ManageDeliveryNotesViewModel"/> class.
 /// </summary>
 /// <param name="modalDialogService">The modal dialog service.</param>
 /// <param name="serviceFactory">The service factory.</param>
 public ManageDeliveryNotesViewModel(IModalDialogService modalDialogService, IServiceFactory serviceFactory)
     : base(modalDialogService, serviceFactory)
 {
     SelectableDeliveryNote = new SelectableViewModelBase<DeliveryNotePackage>();
       ShowCanceledDeliveryNotes = true;
       LoadDeliveryNotes(string.Empty, ShowCanceledDeliveryNotes);
 }
开发者ID:adamnowak,项目名称:SmartWorking,代码行数:12,代码来源:ManageDeliveryNotesViewModel.cs


示例3: FrmAddStock

        public FrmAddStock(IServiceFactory serviceFactory, IMessageBoxDisplayService messageBoxDisplayService)
        {
            _serviceFactory = serviceFactory;
            _messageBoxDisplayService = messageBoxDisplayService;

            InitializeComponent();
        }
开发者ID:pragmasolutions,项目名称:avicola,代码行数:7,代码来源:FrmAddStock.cs


示例4: MainVM

 public MainVM(IServiceFactory serviceFactory)
 {
     _ServiceFactory = serviceFactory;
     MainVM._Instance = this;
     _MainModel = new Model.MainModel();
     Status = "Disconnected";
 }
开发者ID:PigDogBay,项目名称:windows-generic-app,代码行数:7,代码来源:MainVM.cs


示例5: FrmCreateEditClient

 public FrmCreateEditClient(Guid id, IFormFactory formFactory, IServiceFactory serviceFactory)
 {
     FormFactory = formFactory;
     _serviceFactory = serviceFactory;
     _clientId = id;
     InitializeComponent();
 }
开发者ID:pragmasolutions,项目名称:avicola,代码行数:7,代码来源:FrmCreateEditClient.cs


示例6: Resource

        /// <summary>
        /// Creates a new resource for the specified discovery version with the specified name and json dictionary.
        /// </summary>
        internal Resource(IServiceFactory factory, string name, JsonDictionary dictionary)
            : base(factory)
        {
            name.ThrowIfNull("name");
            dictionary.ThrowIfNull("dictionary");

            logger.Debug("Constructing Resource [{0}]", name);
            Name = name;
            information = dictionary;
            if (information == null)
            {
                throw new ArgumentException("got no valid dictionary");
            }

            // Initialize subresources.
            if (information.ContainsKey("resources"))
            {
                var resourceJson = (JsonDictionary)information["resources"];
                resources = new Dictionary<string, IResource>();
                foreach (KeyValuePair<string, object> pair in resourceJson)
                {
                    // Create the subresource.
                    var subResource = (Resource)Factory.CreateResource(pair.Key, pair.Value as JsonDictionary);
                    subResource.Parent = this;
                    resources.Add(pair.Key, subResource);
                }
            }
        }
开发者ID:jithuin,项目名称:infogeezer,代码行数:31,代码来源:Resource.cs


示例7: RedisServer

 public RedisServer(RedisConnection connection, string serviceQueue, IServiceFactory serviceFactory)
 {
     this.connection = connection;
     this.serviceFactory = serviceFactory;
     this.serviceQueue = serviceQueue;
     this.receiveState = 0;
 }
开发者ID:yonglehou,项目名称:ServiceProxy,代码行数:7,代码来源:RedisServer.cs


示例8: MessagingServer

 /// <summary>
 /// Initializes a new instance of the <see cref="MessagingServer" /> class.
 /// </summary>
 /// <param name="clientFactory">Used to create the class that you use to handle all client communication.</param>
 /// <param name="configuration">The configuration.</param>
 public MessagingServer(IServiceFactory clientFactory, MessagingServerConfiguration configuration)
     : base(clientFactory, configuration)
 {
     if (clientFactory == null) throw new ArgumentNullException("clientFactory");
     if (configuration == null) throw new ArgumentNullException("configuration");
     _formatterFactory = configuration.MessageFormatterFactory;
 }
开发者ID:2594636985,项目名称:griffin.networking,代码行数:12,代码来源:MessagingServer.cs


示例9: AudioController

        public AudioController(IServiceFactory ninjectFactory)
        {
            if (ninjectFactory == null)
                throw new ArgumentNullException(nameof(ninjectFactory));

            _tracksService = ninjectFactory.CreateTracksService();
        }
开发者ID:netstalkerrr,项目名称:SoundTube,代码行数:7,代码来源:AudioController.cs


示例10: ManageOrdersViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="ManageOrdersViewModel"/> class.
 /// </summary>
 /// <param name="modalDialogService">The modal dialog service.</param>
 /// <param name="serviceFactory">The service factory.</param>
 public ManageOrdersViewModel(IModalDialogService modalDialogService, IServiceFactory serviceFactory)
     : base(modalDialogService, serviceFactory)
 {
     SelectableOrder = new SelectableViewModelBase<OrderPackage>();
       ShowCanceledOrders = true;
       LoadOrders(string.Empty, ShowCanceledOrders);
 }
开发者ID:adamnowak,项目名称:SmartWorking,代码行数:12,代码来源:ManageOrdersViewModel.cs


示例11: DashboardController

 public DashboardController(IServiceFactory factory, 
                            IProcess<OrgMemberDocVisibilityByOrgAdminParams, GeneralSuccessResultViewModel> orgDocVisibilityProcess)
 {
     _serviceFactory = factory;
     _unitOfWork = factory.GetService<IUnitOfWork>();
     _orgDocVisibilityProcess = orgDocVisibilityProcess;
 }
开发者ID:KallDrexx,项目名称:MyJobLeads,代码行数:7,代码来源:DashboardController.cs


示例12: ReservationsViewModel

        public ReservationsViewModel(IServiceFactory serviceFactory)
        {
            _ServiceFactory = serviceFactory;

            ExecuteRentalCommand = new DelegateCommand<int>(OnExecuteRentalCommandExecute);
            CancelReservationCommand = new DelegateCommand<int>(OnCancelReservationCommandExecute);
        }
开发者ID:colinmacritchie,项目名称:CarRental,代码行数:7,代码来源:ReservationsViewModel.cs


示例13: EditOrderViewModel

        // note that this viewmodel is instantiated on-demand from parent and not with DI

        public EditOrderViewModel(IServiceFactory serviceFactory, int orderId)
        {
            _serviceFactory = serviceFactory ?? Container.GetExportedValue<IServiceFactory>();

            if (orderId == 0)
            {
                _order = new Order();
            }
            else
            {
                WithClient(_serviceFactory.CreateClient<IOrderService>(), orderClient =>
                {
                    _order = orderClient.GetOrder(orderId);
                });
            }

            _order.CleanAll();
            LoadSuppliers();

            EditOrderDetailCommand = new DelegateCommand<OrderDetail>(OnEditOrderDetailCommand);
            AddOrderDetailCommand = new DelegateCommand<object>(OnAddOrderDetailCommand);
            DeleteOrderDetailCommand = new DelegateCommand<int>(OnDeleteOrderDetailCommand);

            SaveCommand = new DelegateCommand<object>(OnSaveCommandExecute, OnSaveCommandCanExecute);
            CancelCommand = new DelegateCommand<object>(OnCancelCommandExecute);
        }
开发者ID:Wolfury,项目名称:BedfordHarbourBOM,代码行数:28,代码来源:EditOrderViewModel.cs


示例14: BaseParameter

        /// <summary>
        /// Creates a new parameter with the specified name and value.
        /// </summary>
        public BaseParameter(IServiceFactory factory, string name, JsonDictionary dictionary)
            : base(factory)
        {
            Name = name;
            information = dictionary;
			information.ThrowIfNull("got no valid dictionary");
        }
开发者ID:jithuin,项目名称:infogeezer,代码行数:10,代码来源:Parameter.cs


示例15: DefineProxyType

        private void DefineProxyType(IServiceFactory servicefactory, ProxyDefinition proxyDefinition)
        {
            //container.Register<ILogFactory, LogFactory>();
            //container.Register<ILogBase,log.Logger>();

            proxyDefinition.Implement(() => servicefactory.GetInstance<IInterceptor>("LogInterceptor"));
        }
开发者ID:GNewsCo,项目名称:DrawPub,代码行数:7,代码来源:CompositionRoot.cs


示例16: SaleGroupViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="MainWindowViewModel"/> class.
 /// </summary>
 /// <param name="modalDialogProvider">The modal dialog service.</param>
 /// <param name="serviceFactory">The service factory.</param>
 public SaleGroupViewModel(IMainViewModel mainViewModel, IModalDialogProvider modalDialogProvider, IServiceFactory serviceFactory)
     : base(mainViewModel, modalDialogProvider, serviceFactory)
 {
     ClientsAndBuildingsTabItemViewModel = new ClientsAndBuildingsTabItemViewModel(mainViewModel, ModalDialogProvider, ServiceFactory);
       OrdersTabItemViewModel = new OrdersTabItemViewModel(mainViewModel, ModalDialogProvider, ServiceFactory);
       DeliveryNotesTabItemViewModel = new DeliveryNotesTabItemViewModel(mainViewModel, ModalDialogProvider, ServiceFactory);
 }
开发者ID:adamnowak,项目名称:SmartWorking,代码行数:12,代码来源:SaleGroupViewModel.cs


示例17: AdministrationGroupViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="MainWindowViewModel"/> class.
 /// </summary>
 /// <param name="modalDialogProvider">The modal dialog service.</param>
 /// <param name="serviceFactory">The service factory.</param>
 public AdministrationGroupViewModel(IMainViewModel mainViewModel, IModalDialogProvider modalDialogProvider, IServiceFactory serviceFactory)
     : base(mainViewModel, modalDialogProvider, serviceFactory)
 {
     DriversAndCarsTabItemViewModel = new DriversAndCarsTabItemViewModel(mainViewModel, ModalDialogProvider, ServiceFactory);
       MaterialsAndContractorsTabItemViewModel = new MaterialsAndContractorsTabItemViewModel(mainViewModel, ModalDialogProvider, ServiceFactory);
       RecipesTabItemViewModel = new RecipesTabItemViewModel(mainViewModel, ModalDialogProvider, ServiceFactory);
 }
开发者ID:adamnowak,项目名称:SmartWorking,代码行数:12,代码来源:AdministrationGroupViewModel.cs


示例18: UcLoadDailyMeasures

 public UcLoadDailyMeasures(IServiceFactory serviceFactory, IStateController stateController)
 {
     _stateController = stateController;
     _serviceFactory = serviceFactory;
     InitializeComponent();
     gvDailyMeasures.TableElement.RowHeight = Avicola.Common.Win.GlobalConstants.DefaultRowHeight;
 }
开发者ID:pragmasolutions,项目名称:avicola,代码行数:7,代码来源:UcLoadDailyMeasures.cs


示例19: RequestProcessor

 public RequestProcessor(JsonSerializer serializer, IServiceFactory serviceFactory, IServiceCatalog services, IServiceInvoker serviceInvoker)
 {
     this.serializer = serializer;
     this.serviceFactory = serviceFactory;
     this.services = services;
     this.serviceInvoker = serviceInvoker;
 }
开发者ID:ZeroBugBounce,项目名称:Halibut,代码行数:7,代码来源:RequestProcessor.cs


示例20: FrmEndBatch

 public FrmEndBatch(Guid id, IFormFactory formFactory, IServiceFactory serviceFactory)
 {
     FormFactory = formFactory;
     _serviceFactory = serviceFactory;
     _batchId = id;
     InitializeComponent();
 }
开发者ID:pragmasolutions,项目名称:avicola,代码行数:7,代码来源:FrmEndBatch.cs



注:本文中的IServiceFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IServiceLocator类代码示例发布时间:2022-05-24
下一篇:
C# IServiceContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap