Skip to content

Commit

Permalink
Merge pull request #748 from Cysharp/feature/FixGenerateSerializerTyp…
Browse files Browse the repository at this point in the history
…eVisibility

Move GenerateSerializerType into MagicOnionClientGenerationAttribute
  • Loading branch information
mayuki authored Mar 21, 2024
2 parents ce280bc + d0dc85c commit 8d367a0
Show file tree
Hide file tree
Showing 97 changed files with 757 additions and 757 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,34 @@ internal class {{MagicOnionClientGenerationAttributeName}} : global::System.Attr
/// <summary>
/// Gets or set the serializer used for message serialization. The default value is <see cref="GenerateSerializerType.MessagePack"/>.
/// </summary>
public global::MagicOnion.Client.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.GenerateSerializerType.MessagePack;
public global::MagicOnion.Client.{{MagicOnionClientGenerationAttributeName}}.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.{{MagicOnionClientGenerationAttributeName}}.GenerateSerializerType.MessagePack;
/// <summary>
/// Gets or set the namespace of pre-generated MessagePackFormatters. The default value is <c>MessagePack.Formatters</c>.
/// </summary>
public string MessagePackFormatterNamespace { get; set; } = "MessagePack.Formatters";
/// <summary>
/// Gets or set whether to enable the StreamingHandler diagnostic handler. This is for debugging purpose. The default value is <see langword="false" />.
/// </summary>
public bool EnableStreamingHubDiagnosticHandler { get; set; } = false;
public string GenerateFileHintNamePrefix { get; set; } = string.Empty;
public global::System.Type[] TypesContainedInTargetAssembly { get; }
/// <param name="typesContainedInTargetAssembly">Types contained in the scan target assembly</param>
public {{MagicOnionClientGenerationAttributeName}}(params global::System.Type[] typesContainedInTargetAssembly)
{
TypesContainedInTargetAssembly = typesContainedInTargetAssembly;
}
}
// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
}
}
}
""");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public interface IGreeterService : IService<IGreeterService>
[MemoryPackable]
public class MyGenericObject<T> {}
[MagicOnionClientGeneration(typeof(IGreeterService), Serializer = GenerateSerializerType.MemoryPack)]
[MagicOnionClientGeneration(typeof(IGreeterService), Serializer = MagicOnionClientGenerationAttribute.GenerateSerializerType.MemoryPack)]
partial class MagicOnionInitializer {}
""";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public interface IGreeterService : IService<IGreeterService>
UnaryResult<string> HelloAsync(string name, int age);
}
[MagicOnionClientGeneration(typeof(IGreeterService), Serializer = GenerateSerializerType.MemoryPack)]
[MagicOnionClientGeneration(typeof(IGreeterService), Serializer = MagicOnionClientGenerationAttribute.GenerateSerializerType.MemoryPack)]
partial class MagicOnionInitializer {}
""";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// <summary>
/// Gets or set the serializer used for message serialization. The default value is <see cref="GenerateSerializerType.MessagePack"/>.
/// </summary>
public global::MagicOnion.Client.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.GenerateSerializerType.MessagePack;
public global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType.MessagePack;

/// <summary>
/// Gets or set the namespace of pre-generated MessagePackFormatters. The default value is <c>MessagePack.Formatters</c>.
Expand All @@ -28,7 +28,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// Gets or set whether to enable the StreamingHandler diagnostic handler. This is for debugging purpose. The default value is <see langword="false" />.
/// </summary>
public bool EnableStreamingHubDiagnosticHandler { get; set; } = false;

public string GenerateFileHintNamePrefix { get; set; } = string.Empty;

public global::System.Type[] TypesContainedInTargetAssembly { get; }
Expand All @@ -38,12 +38,12 @@ public MagicOnionClientGenerationAttribute(params global::System.Type[] typesCon
{
TypesContainedInTargetAssembly = typesContainedInTargetAssembly;
}
}

// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// <summary>
/// Gets or set the serializer used for message serialization. The default value is <see cref="GenerateSerializerType.MessagePack"/>.
/// </summary>
public global::MagicOnion.Client.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.GenerateSerializerType.MessagePack;
public global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType.MessagePack;

/// <summary>
/// Gets or set the namespace of pre-generated MessagePackFormatters. The default value is <c>MessagePack.Formatters</c>.
Expand All @@ -28,7 +28,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// Gets or set whether to enable the StreamingHandler diagnostic handler. This is for debugging purpose. The default value is <see langword="false" />.
/// </summary>
public bool EnableStreamingHubDiagnosticHandler { get; set; } = false;

public string GenerateFileHintNamePrefix { get; set; } = string.Empty;

public global::System.Type[] TypesContainedInTargetAssembly { get; }
Expand All @@ -38,12 +38,12 @@ public MagicOnionClientGenerationAttribute(params global::System.Type[] typesCon
{
TypesContainedInTargetAssembly = typesContainedInTargetAssembly;
}
}

// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// <summary>
/// Gets or set the serializer used for message serialization. The default value is <see cref="GenerateSerializerType.MessagePack"/>.
/// </summary>
public global::MagicOnion.Client.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.GenerateSerializerType.MessagePack;
public global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType.MessagePack;

/// <summary>
/// Gets or set the namespace of pre-generated MessagePackFormatters. The default value is <c>MessagePack.Formatters</c>.
Expand All @@ -28,7 +28,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// Gets or set whether to enable the StreamingHandler diagnostic handler. This is for debugging purpose. The default value is <see langword="false" />.
/// </summary>
public bool EnableStreamingHubDiagnosticHandler { get; set; } = false;

public string GenerateFileHintNamePrefix { get; set; } = string.Empty;

public global::System.Type[] TypesContainedInTargetAssembly { get; }
Expand All @@ -38,12 +38,12 @@ public MagicOnionClientGenerationAttribute(params global::System.Type[] typesCon
{
TypesContainedInTargetAssembly = typesContainedInTargetAssembly;
}
}

// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// <summary>
/// Gets or set the serializer used for message serialization. The default value is <see cref="GenerateSerializerType.MessagePack"/>.
/// </summary>
public global::MagicOnion.Client.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.GenerateSerializerType.MessagePack;
public global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType.MessagePack;

/// <summary>
/// Gets or set the namespace of pre-generated MessagePackFormatters. The default value is <c>MessagePack.Formatters</c>.
Expand All @@ -28,7 +28,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// Gets or set whether to enable the StreamingHandler diagnostic handler. This is for debugging purpose. The default value is <see langword="false" />.
/// </summary>
public bool EnableStreamingHubDiagnosticHandler { get; set; } = false;

public string GenerateFileHintNamePrefix { get; set; } = string.Empty;

public global::System.Type[] TypesContainedInTargetAssembly { get; }
Expand All @@ -38,12 +38,12 @@ public MagicOnionClientGenerationAttribute(params global::System.Type[] typesCon
{
TypesContainedInTargetAssembly = typesContainedInTargetAssembly;
}
}

// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// <summary>
/// Gets or set the serializer used for message serialization. The default value is <see cref="GenerateSerializerType.MessagePack"/>.
/// </summary>
public global::MagicOnion.Client.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.GenerateSerializerType.MessagePack;
public global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType.MessagePack;

/// <summary>
/// Gets or set the namespace of pre-generated MessagePackFormatters. The default value is <c>MessagePack.Formatters</c>.
Expand All @@ -28,7 +28,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// Gets or set whether to enable the StreamingHandler diagnostic handler. This is for debugging purpose. The default value is <see langword="false" />.
/// </summary>
public bool EnableStreamingHubDiagnosticHandler { get; set; } = false;

public string GenerateFileHintNamePrefix { get; set; } = string.Empty;

public global::System.Type[] TypesContainedInTargetAssembly { get; }
Expand All @@ -38,12 +38,12 @@ public MagicOnionClientGenerationAttribute(params global::System.Type[] typesCon
{
TypesContainedInTargetAssembly = typesContainedInTargetAssembly;
}
}

// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// <summary>
/// Gets or set the serializer used for message serialization. The default value is <see cref="GenerateSerializerType.MessagePack"/>.
/// </summary>
public global::MagicOnion.Client.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.GenerateSerializerType.MessagePack;
public global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType.MessagePack;

/// <summary>
/// Gets or set the namespace of pre-generated MessagePackFormatters. The default value is <c>MessagePack.Formatters</c>.
Expand All @@ -28,7 +28,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// Gets or set whether to enable the StreamingHandler diagnostic handler. This is for debugging purpose. The default value is <see langword="false" />.
/// </summary>
public bool EnableStreamingHubDiagnosticHandler { get; set; } = false;

public string GenerateFileHintNamePrefix { get; set; } = string.Empty;

public global::System.Type[] TypesContainedInTargetAssembly { get; }
Expand All @@ -38,12 +38,12 @@ public MagicOnionClientGenerationAttribute(params global::System.Type[] typesCon
{
TypesContainedInTargetAssembly = typesContainedInTargetAssembly;
}
}

// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// <summary>
/// Gets or set the serializer used for message serialization. The default value is <see cref="GenerateSerializerType.MessagePack"/>.
/// </summary>
public global::MagicOnion.Client.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.GenerateSerializerType.MessagePack;
public global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType.MessagePack;

/// <summary>
/// Gets or set the namespace of pre-generated MessagePackFormatters. The default value is <c>MessagePack.Formatters</c>.
Expand All @@ -28,7 +28,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// Gets or set whether to enable the StreamingHandler diagnostic handler. This is for debugging purpose. The default value is <see langword="false" />.
/// </summary>
public bool EnableStreamingHubDiagnosticHandler { get; set; } = false;

public string GenerateFileHintNamePrefix { get; set; } = string.Empty;

public global::System.Type[] TypesContainedInTargetAssembly { get; }
Expand All @@ -38,12 +38,12 @@ public MagicOnionClientGenerationAttribute(params global::System.Type[] typesCon
{
TypesContainedInTargetAssembly = typesContainedInTargetAssembly;
}
}

// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// <summary>
/// Gets or set the serializer used for message serialization. The default value is <see cref="GenerateSerializerType.MessagePack"/>.
/// </summary>
public global::MagicOnion.Client.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.GenerateSerializerType.MessagePack;
public global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType Serializer { get; set; } = global::MagicOnion.Client.MagicOnionClientGenerationAttribute.GenerateSerializerType.MessagePack;

/// <summary>
/// Gets or set the namespace of pre-generated MessagePackFormatters. The default value is <c>MessagePack.Formatters</c>.
Expand All @@ -28,7 +28,7 @@ internal class MagicOnionClientGenerationAttribute : global::System.Attribute
/// Gets or set whether to enable the StreamingHandler diagnostic handler. This is for debugging purpose. The default value is <see langword="false" />.
/// </summary>
public bool EnableStreamingHubDiagnosticHandler { get; set; } = false;

public string GenerateFileHintNamePrefix { get; set; } = string.Empty;

public global::System.Type[] TypesContainedInTargetAssembly { get; }
Expand All @@ -38,12 +38,12 @@ public MagicOnionClientGenerationAttribute(params global::System.Type[] typesCon
{
TypesContainedInTargetAssembly = typesContainedInTargetAssembly;
}
}

// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
// This enum must be mirror of `SerializerType` (MagicOnionClientSourceGenerator)
internal enum GenerateSerializerType
{
MessagePack = 0,
MemoryPack = 1,
}
}
}
Loading

0 comments on commit 8d367a0

Please sign in to comment.