本文整理汇总了C#中ApplicationConfiguration.LoadCachedEndpoints方法的典型用法代码示例。如果您正苦于以下问题:C# ApplicationConfiguration.LoadCachedEndpoints方法的具体用法?C# ApplicationConfiguration.LoadCachedEndpoints怎么用?C# ApplicationConfiguration.LoadCachedEndpoints使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApplicationConfiguration
的用法示例。
在下文中一共展示了ApplicationConfiguration.LoadCachedEndpoints方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ClientPage
public ClientPage(
ServiceMessageContext context,
ApplicationInstance application,
ClientPage masterPage,
ApplicationConfiguration configuration)
{
InitializeComponent();
if (!configuration.SecurityConfiguration.AutoAcceptUntrustedCertificates)
{
configuration.CertificateValidator.CertificateValidation += new CertificateValidationEventHandler(CertificateValidator_CertificateValidation);
}
m_masterPage = masterPage;
m_context = context;
m_application = application;
m_server = application.Server as Opc.Ua.Server.StandardServer;
if (m_masterPage == null)
{
m_pages = new List<ClientPage>();
}
m_configuration = configuration;
SessionsCTRL.Configuration = configuration;
SessionsCTRL.MessageContext = context;
SessionsCTRL.AddressSpaceCtrl = BrowseCTRL;
SessionsCTRL.NodeSelected += SessionCtrl_NodeSelected;
// get list of cached endpoints.
m_endpoints = m_configuration.LoadCachedEndpoints(true);
m_endpoints.DiscoveryUrls = configuration.ClientConfiguration.WellKnownDiscoveryUrls;
// hook up endpoint selector
EndpointSelectorCTRL.Initialize(m_endpoints, m_configuration);
EndpointSelectorCTRL.ConnectEndpoint += EndpointSelectorCTRL_ConnectEndpoint;
EndpointSelectorCTRL.EndpointsChanged += EndpointSelectorCTRL_OnChange;
BrowseCTRL.SessionTreeCtrl = SessionsCTRL;
BrowseCTRL.NodeSelected += BrowseCTRL_NodeSelected;
// exception dialog
GuiUtils.ExceptionMessageDlg += ExceptionMessageDlg;
ServerUrlTB.Text = "None";
m_publishers = AmqpConnectionCollection.Load(configuration);
foreach (var publisher in m_publishers)
{
Task t = publisher.OpenAsync();
}
m_MonitoredItem_Notification = new MonitoredItemNotificationEventHandler(MonitoredItem_Notification);
}
示例2: PublisherForm
public PublisherForm(
ServiceMessageContext context,
ApplicationInstance application,
PublisherForm masterForm,
ApplicationConfiguration configuration)
{
InitializeComponent();
this.Icon = ClientUtils.GetAppIcon();
m_masterForm = masterForm;
m_context = context;
m_application = application;
m_server = application.Server as Opc.Ua.Server.StandardServer;
if (m_masterForm == null)
{
m_forms = new List<PublisherForm>();
}
SessionsCTRL.Configuration = m_configuration = configuration;
SessionsCTRL.MessageContext = context;
// get list of cached endpoints.
m_endpoints = m_configuration.LoadCachedEndpoints(true);
m_endpoints.DiscoveryUrls = configuration.ClientConfiguration.WellKnownDiscoveryUrls;
EndpointSelectorCTRL.Initialize(m_endpoints, m_configuration);
// initialize control state.
Disconnect();
//lth: initial MassTransit Publisher
m_massTransitPublisher = new MassTransitPublisher();
this.NotificationsCTRL.ItemsAdded += NotificationsCTRL_ItemsAdded;
}
示例3: MainForm
public MainForm()
{
InitializeComponent();
m_ItemNotification = new MonitoredItemNotificationEventHandler(ItemNotification);
SetListViewColumnHeaderDefaults(ServerListView);
m_configuration = ApplicationConfiguration.Load("Opc.Ua.Client", ApplicationType.Client);
// get list of cached endpoints.
m_endpoints = m_configuration.LoadCachedEndpoints(true);
EndpointSelectorCTRL.Initialize(m_endpoints, m_configuration);
Disconnect();
}