public MetadataMethodInfoAdapterTest()
        {
            lifetimeDefinition = Lifetimes.Define(EternalLifetime.Instance);

            var lifetime    = lifetimeDefinition.Lifetime;
            var gacResolver = GacAssemblyResolver.CreateOnCurrentRuntimeGac(GacAssemblyResolver.GacResolvePreferences.MatchSameOrNewer);
            var resolver    = new CombiningAssemblyResolver(gacResolver, new LoadedAssembliesResolver(lifetime, true));

            loader = new MetadataLoader(resolver);

            lifetime.AddDispose(loader);
        }
        public TisServiceRegistryProvider()
        {
            m_gacAssemblyResolver = new GacAssemblyResolver();
            Type serviceRegistryProviderType = null;

            try
            {
                AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(m_gacAssemblyResolver.AssemblyResolveHandler);
                serviceRegistryProviderType              = Type.GetType(TisServicesConst.SERVICE_REGISTRY_PROVIDER_TYPE_NAME);
            }
            finally
            {
                AppDomain.CurrentDomain.AssemblyResolve -= new ResolveEventHandler(m_gacAssemblyResolver.AssemblyResolveHandler);
            }

            if (serviceRegistryProviderType == null)
            {
                throw new TisException("Failed to load services schema ");
            }

            m_serviceRegistry = new TisServiceRegistry(serviceRegistryProviderType);
        }