public void AddSource(GeneratorExecutionContext context, INamedTypeSymbol generatingForType, TypeAttachmentMetadata metadata, GenerationOptions options)
        {
            var code = WrapSourceOutput(generatingForType, CreateSource(generatingForType.Name));

            context.AddSource(GetGeneratedFileName(generatingForType, "NsJsonConverter"), code);

            metadata.AddAttributeLiteral($"Newtonsoft.Json.JsonConverter(typeof({generatingForType.Name}.{generatingForType.Name}NsJsonConverter))");
        }
        public void AddSource(GeneratorExecutionContext context, INamedTypeSymbol generatingForType, TypeAttachmentMetadata metadata, GenerationOptions options)
        {
            var code = WrapSourceOutput(generatingForType, CreateSource(generatingForType.Name));

            context.AddSource(GetGeneratedFileName(generatingForType, "BsonSerializer"), code);

            metadata.AddAttributeLiteral($"BsonSerializer(typeof({generatingForType.Name}.{generatingForType.Name}BsonSerialiser))");
            metadata.AddNamespace("MongoDB.Bson.Serialization.Attributes");
        }
        public void AddSource(GeneratorExecutionContext context, INamedTypeSymbol generatingForType, TypeAttachmentMetadata metadata, GenerationOptions options)
        {
            var code = WrapSourceOutput(generatingForType, CreateSource(generatingForType));

            context.AddSource(GetGeneratedFileName(generatingForType, "TypeConverter"), code);

            metadata.AddAttributeLiteral($"TypeConverter(typeof({generatingForType.Name}.{generatingForType.Name}TypeConverter))");
            metadata.AddNamespace("System.ComponentModel");
        }