private static IEnumerable <INamedTypeSymbol> GetAttributesForMethodsToIgnore(
                Compilation compilation
                )
            {
                // Ignore methods with special serialization attributes, which are invoked by the runtime
                // for deserialization.
                var onDeserializingAttribute = compilation.OnDeserializingAttribute();

                if (onDeserializingAttribute != null)
                {
                    yield return(onDeserializingAttribute);
                }

                var onDeserializedAttribute = compilation.OnDeserializedAttribute();

                if (onDeserializedAttribute != null)
                {
                    yield return(onDeserializedAttribute);
                }

                var onSerializingAttribute = compilation.OnSerializingAttribute();

                if (onSerializingAttribute != null)
                {
                    yield return(onSerializingAttribute);
                }

                var onSerializedAttribute = compilation.OnSerializedAttribute();

                if (onSerializedAttribute != null)
                {
                    yield return(onSerializedAttribute);
                }

                var comRegisterFunctionAttribute = compilation.ComRegisterFunctionAttribute();

                if (comRegisterFunctionAttribute != null)
                {
                    yield return(comRegisterFunctionAttribute);
                }

                var comUnregisterFunctionAttribute = compilation.ComUnregisterFunctionAttribute();

                if (comUnregisterFunctionAttribute != null)
                {
                    yield return(comUnregisterFunctionAttribute);
                }
            }