本文整理汇总了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;
}
示例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;
}
示例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";
}
示例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;
}
示例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);
}
示例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" };
}
示例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;
}
示例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 ?? "";
}
示例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>();
}
示例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;
}
示例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));
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}