コード例 #1
0
 public bool UnRegisterProvider(InstrumentationProvider provider)
 {
     lock (m_Providers)
     {
         return(m_Providers.Remove(provider));
     }
 }
コード例 #2
0
 public void RegisterProvider(InstrumentationProvider provider)
 {
     lock (m_Providers)
     {
         if (!m_Providers.Contains(provider))
         {
             m_Providers.Add(provider);
         }
     }
 }
コード例 #3
0
        protected override void DoConfigure(NFX.Environment.IConfigSectionNode node)
        {
            try
            {
                base.DoConfigure(node);

                m_Provider = FactoryUtils.MakeAndConfigure(node[CONFIG_PROVIDER_SECTION], typeof(NOPInstrumentationProvider), new[] { this }) as InstrumentationProvider;
            }
            catch (Exception error)
            {
                throw new NFXException(StringConsts.INSTRUMENTATIONSVC_PROVIDER_CONFIG_ERROR + error.Message, error);
            }
        }
コード例 #4
0
        protected override void DoConfigure(NFX.Environment.IConfigSectionNode node)
        {
            try
            {
                base.DoConfigure(node);

                m_Provider = FactoryUtils.MakeAndConfigure(node[CONFIG_PROVIDER_SECTION]) as InstrumentationProvider;

                if (m_Provider == null)
                {
                    throw new NFXException("Provider is null");
                }

                m_Provider.__setComponentDirector(this);
            }
            catch (Exception error)
            {
                throw new NFXException(StringConsts.INSTRUMENTATIONSVC_PROVIDER_CONFIG_ERROR + error.Message, error);
            }
        }