test/T4Toolbox.Tests/FakeTextTemplatingService.cs
/// <summary>
/// Resolves full assembly references from GAC. Assembly reference must include name, version, public key token and processor architecture.
/// </summary>
Resolves full assembly references from GAC. Assembly reference must include name, version, public key token and processor architecture.
Resolves full assembly references from GAC . Assembly reference must include name version public key token and processor architecture .
string ITextTemplatingEngineHost.ResolveAssemblyReference(string assemblyReference)
        {
            AppDomain tempDomain = AppDomain.CreateDomain("AssemblyResolutionDomain");
            try
            {
                var resolver = (AssemblyResolver)tempDomain.CreateInstanceFromAndUnwrap(this.GetType().Assembly.Location, typeof(AssemblyResolver).FullName);
                string resolvedReference = resolver.ResolveAssemblyReference(assemblyReference);
                return resolvedReference;
            }
            finally
            {
                AppDomain.Unload(tempDomain);
            }
        }
string ITextTemplatingEngineHost . ResolveAssemblyReference ( string assemblyReference ) { AppDomain tempDomain = AppDomain . CreateDomain ( " " ) ; try { var resolver = ( AssemblyResolver ) tempDomain . CreateInstanceFromAndUnwrap ( this . GetType ( ) . Assembly . Location , typeof ( AssemblyResolver ) . FullName ) ; string resolvedReference = resolver . ResolveAssemblyReference ( assemblyReference ) ; return resolvedReference ; } finally { AppDomain . Unload ( tempDomain ) ; } }
Resolves full assembly references from GAC.
Resolves full assembly references from GAC .
assemblyReference
string