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(); }
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); }