Ejemplo n.º 1
0
        private IAssemblyCookie CreateCookieCore([NotNull] AssemblyReferenceTarget target)
        {
            FileSystemPath result = ResolveManager.Resolve(target, _resolveProject, _moduleReferenceResolveContext);

            return(result != null
                                ? _assemblyFactory.AddRef(result, "T4", _moduleReferenceResolveContext)
                                : null);
        }
Ejemplo n.º 2
0
        private IAssemblyCookie CreateCookieCore([NotNull] AssemblyReferenceTarget target)
        {
            AssemblyReferenceResolveResult result = ResolveManager.Resolve(target, _resolveProject);

            return(result != null
                                ? _assemblyFactory.AddRef(result, "T4", _t4Environment.PlatformID)
                                : null);
        }
Ejemplo n.º 3
0
        private IAssemblyCookie CreateCookie(string assemblyNameOrFile)
        {
            if (assemblyNameOrFile == null || (assemblyNameOrFile = assemblyNameOrFile.Trim()).Length == 0)
            {
                return(null);
            }

            AssemblyReferenceTarget target = null;

            // assembly path
            FileSystemPath path = FileSystemPath.TryParse(assemblyNameOrFile);

            if (!path.IsEmpty && path.IsAbsolute)
            {
                target = new AssemblyReferenceTarget(AssemblyNameInfo.Empty, path);
            }

            // assembly name
            else
            {
                AssemblyNameInfo nameInfo = AssemblyNameInfo.TryParse(assemblyNameOrFile);
                if (nameInfo != null)
                {
                    target = new AssemblyReferenceTarget(nameInfo, FileSystemPath.Empty);
                }
            }

            if (target == null)
            {
                return(null);
            }

            AssemblyReferenceResolveResult result = ResolveManager.Resolve(target, _resolveProject);

            if (result == null)
            {
                return(null);
            }

            return(_assemblyFactory.AddRef(result, "T4", _t4Environment.PlatformID));
        }