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