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


C# ApplicationConfiguration.LoadCachedEndpoints方法代码示例

本文整理汇总了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);
        }
开发者ID:yuriik83,项目名称:UA-.UWP-Universal-Windows-Platform,代码行数:56,代码来源:ClientPage.xaml.cs

示例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;
        }
开发者ID:yuriik83,项目名称:opcesb,代码行数:34,代码来源:PublisherForm.cs

示例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();
        }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:16,代码来源:MainForm.cs


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