Пример #1
0
 internal static ResourceState LookupResourcesInCurrentDomain(String addInAssemblyFileName,
     String resMgrBaseName, String nameResource, String publisherResource, String descriptionResource)
 {
     ResourceLookupWorker worker = new ResourceLookupWorker();
     ResourceState state = worker.Lookup(addInAssemblyFileName, resMgrBaseName, nameResource, publisherResource, descriptionResource);
     return state;
 }
Пример #2
0
        internal static ResourceState LookupResourcesInCurrentDomain(String addInAssemblyFileName,
                                                                     String resMgrBaseName, String nameResource, String publisherResource, String descriptionResource)
        {
            ResourceLookupWorker worker = new ResourceLookupWorker();
            ResourceState        state  = worker.Lookup(addInAssemblyFileName, resMgrBaseName, nameResource, publisherResource, descriptionResource);

            return(state);
        }
Пример #3
0
        internal static ResourceState LookupResourcesInNewDomain(String addInAssemblyFileName,
                                                                 String resMgrBaseName, String nameResource, String publisherResource, String descriptionResource)
        {
            AppDomain domain = AppDomain.CreateDomain("Add-in model resource lookup domain");

            try {
                ResourceLookupWorker worker = (ResourceLookupWorker)domain.CreateInstanceAndUnwrap(
                    typeof(ResourceProvider).Assembly.FullName,
                    typeof(ResourceProvider.ResourceLookupWorker).FullName);
                return(worker.Lookup(addInAssemblyFileName, resMgrBaseName, nameResource, publisherResource, descriptionResource));
            }
            finally {
                AppDomain.Unload(domain);
            }
        }