Ejemplo n.º 1
0
 public CSDeclarationWriter(ISyntaxWriter writer, ICciFilter filter, bool forCompilation)
 {
     Contract.Requires(writer != null);
     _writer         = writer;
     _filter         = filter;
     _forCompilation = forCompilation;
     _forCompilationIncludeGlobalprefix    = false;
     _platformNotSupportedExceptionMessage = null;
     _includeFakeAttributes = false;
     _alwaysIncludeBase     = false;
     _metadataReaderCache   = new SRMetadataPEReaderCache();
 }
Ejemplo n.º 2
0
        public static object GetExplicitInterfaceMethodNullableAttributeArgument(this IMethodImplementation methodImplementation, SRMetadataPEReaderCache metadataReaderCache)
        {
            if (methodImplementation != null)
            {
                uint   typeToken = ((IMetadataObjectWithToken)methodImplementation.ContainingType).TokenValue;
                string location  = methodImplementation.ContainingType.Locations.FirstOrDefault()?.Document?.Location;
                if (location != null)
                {
                    return(methodImplementation.ImplementedMethod.ContainingType.GetInterfaceImplementationAttributeConstructorArgument(typeToken, location, metadataReaderCache, NullableConstructorArgumentParser));
                }
            }

            return(null);
        }