BondInEtwLinqpadDriver.BondDynamicDriver.GetAssembliesToAdd C# (CSharp) Method

GetAssembliesToAdd() public method

Returns a list of additional assemblies to reference when building queries.
public GetAssembliesToAdd ( IConnectionInfo cxInfo ) : IEnumerable
cxInfo IConnectionInfo Connection information, as entered by the user.
return IEnumerable
        public override IEnumerable<string> GetAssembliesToAdd(IConnectionInfo cxInfo)
        {
            var bondInEtwProperties = new BondInEtwProperties(cxInfo);
            IEnumerable<string> result = null;

            try
            {
                var driverDirectory = Path.GetDirectoryName(Assembly.GetAssembly(this.GetType()).Location);

                result = GetAssemblyTypes(driverDirectory)
                    .Concat(TypeCache.GetTypes(bondInEtwProperties.ContextName))
                    .Select(type => type.Assembly)
                    .Concat(assemblies)
                    .Distinct()
                    .Select(assembly => assembly.Location)
                    .ToList();
            }
            catch
            {
                // Ignore
            }

            return result;
        }