Sha256: fbc374ce8065389395b4aefb57d90467aaa932225bec03ccf5b5731c4b393c62

Contents?: true

Size: 688 Bytes

Versions: 46

Compression:

Stored size: 688 Bytes

Contents

#include "StdAfx.h"
#include "DynamicAssemblyResolver.h"

void DynamicAssemblyResolver::PrivatePath::set(String^ path) {
	_PrivatePath = path;
	AppDomain::CurrentDomain->AssemblyResolve += gcnew ResolveEventHandler(Resolve);
}

Assembly^ DynamicAssemblyResolver::Resolve(Object^ sender, ResolveEventArgs^ args)
{
	try
	{
    auto fullPrivatePath = Path::Combine(_PrivatePath, AssemblyFromQualifiedName(args->Name));
		return Assembly::LoadFrom(fullPrivatePath);
	}
	catch(...) { }

	return nullptr;
}

String^ DynamicAssemblyResolver::AssemblyFromQualifiedName(String^ qualifiedName)
{
		return qualifiedName->Substring(0, qualifiedName->IndexOf(",")) + ".dll";
}

Version data entries

46 entries across 46 versions & 2 rubygems

Version Path
uia-1.0 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
rautomation-1.1.0 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.8 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
rautomation-1.0.0 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.7 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.7.alpha.1 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.6 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
rautomation-0.17.0 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
rautomation-0.16.0 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
rautomation-0.15.0 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.5 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.4.4 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.4.3 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.4.2 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.4.1 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.4 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.3.3 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.3.2 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.3.1 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp
uia-0.3 ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp