Пример #1
0
        private VbaType FindExistingType(ComTypes.ITypeInfo info)
        {
            Contract.Requires <ArgumentNullException>(info != null);

            var typeName = ComHelper.GetTypeName(info);
            var query    = PrimitiveTypes
                           .Concat(UserDefinedTypes)
                           .Concat(_typeLibraries.LoadedLibraries.SelectMany(l => l.UserDefinedTypes))
                           .Where(t => t.MatchNameOrAlias(typeName));

            return(query.FirstOrDefault());
        }