コード例 #1
0
        protected override object GetExtender(string name)
        {
            var type = TypeSymbol;

            if (type == null)
            {
                throw Exceptions.ThrowEUnexpected();
            }

            var assembly = type.ContainingAssembly;

            if (assembly == null)
            {
                return(string.Empty);
            }

            var compilation = GetCompilation();

            if (!(compilation.GetMetadataReference(assembly) is PortableExecutableReference metadataReference))
            {
                return(string.Empty);
            }

            return(CodeModelService.GetExternalTypeExtender(name, metadataReference.FilePath));
        }