当前位置: 首页>>代码示例>>C#>>正文


C# Infrastructure类代码示例

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


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

示例1: GetOrAdd

        public Infrastructure.IMessageQueue GetOrAdd(object service, Infrastructure.ProcessingMode mode)
        {
            var key = new Tuple<object, ProcessingMode>(service, mode);

            var queue = _queues.GetOrAdd(key, CreateQueue(key));
            return queue;
        }
开发者ID:hariharanpalani,项目名称:EventBus,代码行数:7,代码来源:MessageQueueCache.cs

示例2: FindBy

        public IEnumerable<Order> FindBy(Infrastructure.Query query)
        {
            IList<Order> orders = new List<Order>();

            using (SqlConnection conn = new SqlConnection(_connectionString)) 
            {
                SqlCommand cmd = conn.CreateCommand();
                query.TranslateInfo(cmd);
                conn.Open();

                using (SqlDataReader reader = cmd.ExecuteReader())
                {
                    while (reader.Read()) 
                    {
                        orders.Add(new Order() 
                        {
                            CustomerId = new Guid(reader["CustomerId"].ToString()),
                            OrderDate = DateTime.Parse(reader["OrderDate"].ToString()),
                            Id = new Guid(reader["Id"].ToString()),
                        });
                    }
                }
            }

            return orders;
        }
开发者ID:NDChen,项目名称:MyDemoCode,代码行数:26,代码来源:OrderRepository.cs

示例3: RESTScreenViewModel

        public RESTScreenViewModel(Infrastructure infrastructure, CodeEditorViewModel requestBodyViewModel,
            CodeEditorViewModel resultViewModel)
        {
            Ensure.ArgumentNotNull(infrastructure, "infrastructure");

            ResultEditor = resultViewModel;
            RequestBodyEditor = requestBodyViewModel;

            _infrastructure = infrastructure;
            base.DisplayName = "REST";
            _eventAggregator = infrastructure.EventAggregator;

            Methods = new List<ComboBoxItemViewModel>
            {
                ComboBoxItemViewModel.FromString("GET"),
                ComboBoxItemViewModel.FromString("POST"),
                ComboBoxItemViewModel.FromString("PUT"),
                ComboBoxItemViewModel.FromString("DELETE"),
                ComboBoxItemViewModel.FromString("HEAD"),
                ComboBoxItemViewModel.FromString("OPTIONS"),
                ComboBoxItemViewModel.FromString("TRACE"),
                ComboBoxItemViewModel.FromString("PATCH"),
            };
            Method = "GET";
        }
开发者ID:Xamarui,项目名称:elasticops,代码行数:25,代码来源:RESTScreenViewModel.cs

示例4: ServicesManager

        public ServicesManager(
            INutConfiguration configurationManager,
            Infrastructure.ConfigurationManagement.DbConfigurationSettings.Factory dbConfigurationSettingsFactory,
            IEventBus eventBus,
            IEnumerable<IReportPeriodically> pushServices,
            IEnumerable<IRemoteInvocationService> remoteInvokedServices,
            Services.IGlobalSettingsService globalSettings,
            Func<RegisteredPackagesPollingClient> packagesPollerFactory,
            Func<PollingClientCollection> pollingCollectionFactory,
            Repositories.IPackageRepository packageRepository,
            IHoardeManager hoardeManager)
        {
            _log = LogProvider.For<ServicesManager>();

            _configurationManager = configurationManager;
            _dbConfigurationSettingsFactory = dbConfigurationSettingsFactory;
            _eventBus = eventBus;
            _pushServices = pushServices;
            _remoteInvokedServices = remoteInvokedServices;
            _globalSettings = globalSettings;

            _packagesPollerFactory = packagesPollerFactory;
            _pollingCollectionFactory = pollingCollectionFactory;

            _packageRepository = packageRepository;

            _hoardeManager = hoardeManager;
        }
开发者ID:dealproc,项目名称:Drey,代码行数:28,代码来源:ServicesManager.cs

示例5: PickOutputChannel

 protected override int PickOutputChannel(Infrastructure.ChannelMessageEventArgs e)
 {
     if (e.Message.Headers.ContainsKey("ProductType"))
         return (string)e.Message.Headers["ProductType"] == "Cars" ? 0 : 1;
     else
         return base.PickOutputChannel(e);
 }
开发者ID:HaishiBai,项目名称:EnterpriseIntegrationPatterns,代码行数:7,代码来源:HeaderBasedRouter.cs

示例6: MovieBookingService

        public MovieBookingService(Infrastructure.IBus bus)
        {
            this.bus = bus;

            this.cinemaList = new List<string>() { "Streatham", "Brixton", "West Norwood" };
            this.movieList = new List<string>() { "Captain America", "Thor", "The Hunger Games", "The Hunt for Red October" };
        }
开发者ID:kzhen,项目名称:CinemaBooking,代码行数:7,代码来源:MovieBookingService.cs

示例7: SaveSetting

 /// <summary>
 /// 保存设置到配置中
 /// </summary>
 /// <param name="info"></param>
 public void SaveSetting(Infrastructure.Crosscutting.Updater.UpdateInfo info)
 {
     info.DeleteFileLimits = this.deleteRules.Lines;
     info.DeleteMethod = (Infrastructure.Crosscutting.Updater.DeletePreviousProgramMethod)this.deletePreviousFileMode.SelectedIndex;
     info.RequiredMinVersion = this.requiredMinVersion.Text;
     info.PackagePassword = this.txtPackagePassword.Text;
 }
开发者ID:jiguixin,项目名称:MyLibrary,代码行数:11,代码来源:OptionTab.cs

示例8: UpdateInterface

 /// <summary>
 /// 根据配置更新界面
 /// </summary>
 /// <param name="info"></param>
 public void UpdateInterface(Infrastructure.Crosscutting.Updater.UpdateInfo info)
 {
     this.deletePreviousFileMode.SelectedIndex = (int)info.DeleteMethod;
     this.deleteRules.Text = info.DeleteFileLimits.IsEmpty() ? "" : string.Join(Environment.NewLine, info.DeleteFileLimits);
     this.requiredMinVersion.Text = info.RequiredMinVersion;
     this.txtPackagePassword.Text = info.PackagePassword ?? "";
 }
开发者ID:jiguixin,项目名称:MyLibrary,代码行数:11,代码来源:OptionTab.cs

示例9: SearchResultGroup

        /// <summary>
        /// Initializes a new instance of an object.
        /// </summary>
        /// <param name="id">Grou Id.</param>
        /// <param name="name">Group name.</param>
        /// <param name="query">Current search query.</param>
        public SearchResultGroup(string id, string name, Infrastructure.Search.SearchQuery query)
        {
            this.Name = name;
            this.Excerpt = string.Empty;
            this.Url = url => { return url.Action("Index", "Home", new { q = query.WithoutCriterion("skip").WithoutCriterion("take").WithCriterion("in", id).ToString() }); };

            this.Results = new List<SearchResultBase>();
        }
开发者ID:volpav,项目名称:toprope,代码行数:14,代码来源:SearchResultGroup.cs

示例10: Tab

        /// <summary>
        /// Creates a tab that will load the given tab data when opened.
        /// </summary>
        /// <param name="tabData">The tab data to be loaded.</param>
        public Tab(Infrastructure.Tab tabData)
            : this()
        {
            NavigateFirst = true;

            this.TabData = tabData;
            this.Title = tabData.Title;
        }
开发者ID:alexcepoi,项目名称:ShareTabWin,代码行数:12,代码来源:Tab.cs

示例11: Instance_DownloadProgressChanged

        void Instance_DownloadProgressChanged(object sender, Infrastructure.Crosscutting.Updater.Wrapper.RunworkEventArgs e)
        {
            pbProgress.Style = ProgressBarStyle.Blocks;
            pbProgress.Value = e.Progress.TaskPercentage;

            if (!string.IsNullOrEmpty(e.Progress.StateMessage)) lblProgressDesc.Text = e.Progress.StateMessage;
            else lblProgressDesc.Text = string.Format("{0}/{1}", ExtensionMethod.ToSizeDescription(e.Progress.TaskProgress), ExtensionMethod.ToSizeDescription(e.Progress.TaskCount));
        }
开发者ID:jiguixin,项目名称:MyLibrary,代码行数:8,代码来源:RunUpdate.cs

示例12: LoadXaml

 public override FrameworkElement LoadXaml(IDeviceAgent devices, KioskState state, Infrastructure.ObjectModel.TransactionContextBase transactionContext)
 {
     FrameworkElement viewGrid = base.LoadXaml(devices, state, transactionContext);
     DProcessPayment doPayment = new DProcessPayment(this.DoPayment);
     Devices.GetCashAcceptor().NoteStackedEvent += OnNoteStackedEvent;
     doPayment.BeginInvoke(null, null);
     return viewGrid;
 }
开发者ID:CubeFramework,项目名称:Platform,代码行数:8,代码来源:ProcessingPaymentPresenter.cs

示例13: AddressBookViewModel

 //IPeopleService _peopleService;
 public AddressBookViewModel(IPeopleRepository repository, Infrastructure.IView view)
 {
     //_peopleService = peopleService;
     //this.People = _peopleService.GetAll().ToList();
     var people = repository.GetAll().ToList();
     _people = people;
     View = view;
     View.ViewModel = this;
 }
开发者ID:kulkarnirahul17,项目名称:AddressBook-WPF-Prism,代码行数:10,代码来源:AddressBookViewModel.cs

示例14: DataViewerViewModel

 public DataViewerViewModel(Infrastructure infrastructure, TypesListViewModel typesListViewModel,
     PaggerViewModel paggerModel)
     : base(infrastructure)
 {
     _infrastructure = infrastructure;
     TypesList = typesListViewModel;
     base.DisplayName = "Data Viewer";
     PaggerModel = paggerModel;
     paggerModel.OnPageChanged = View;
 }
开发者ID:Xamarui,项目名称:elasticops,代码行数:10,代码来源:DataViewerViewModel.cs

示例15: SinaController

 public SinaController(Infrastructure.Crosscutting.Authorize.IUserService user,
     Infrastructure.Crosscutting.Authorize.IUserExtensionService userExtension)
 {
     if (user == null)
     {
         throw new ArgumentNullException("userService is null");
     }
     userService = user;
     userExtensionService = userExtension;
 }
开发者ID:JPomichael,项目名称:Miaow,代码行数:10,代码来源:SinaController.cs


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