Skip to content

Commit

Permalink
Replace T4 with raw string literale
Browse files Browse the repository at this point in the history
  • Loading branch information
hadashiA committed Aug 10, 2023
1 parent 975c5f5 commit 79da641
Show file tree
Hide file tree
Showing 9 changed files with 814 additions and 1,901 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
// <auto-generated>
// THIS (.cs) FILE IS GENERATED BY UnitGenerator. DO NOT CHANGE IT.
// </auto-generated>
#pragma warning disable CS8669
using System;

namespace FileGenerate
#pragma warning disable CS8669
using System;namespace FileGenerate
{
[System.ComponentModel.TypeConverter(typeof(ATypeConverter))]
public readonly partial struct A : IEquatable<A>
readonly partial struct A : IEquatable<A>
{
readonly int value;

Expand All @@ -17,18 +12,17 @@ public A(int value)
{
this.value = value;
}


public static explicit operator int(A value)

public static implicit operator int(A value)
{
return value.value;
}

public static explicit operator A(int value)
public static implicit operator A(int value)
{
return new A(value);
}

public bool Equals(A other)
{
return value.Equals(other.value);
Expand All @@ -47,19 +41,19 @@ public override bool Equals(object obj)
return value.Equals((int)obj);
}

return value.Equals(obj);
return value.Equals(obj);
}

public override int GetHashCode()
{
return value.GetHashCode();
}

public override string ToString()
{
return "A(" + value + ")";
return value.ToString();
}

public static bool operator ==(in A x, in A y)
{
return x.value.Equals(y.value);
Expand All @@ -70,15 +64,6 @@ public override string ToString()
return !x.value.Equals(y.value);
}










// Default
private class ATypeConverter : System.ComponentModel.TypeConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
// <auto-generated>
// THIS (.cs) FILE IS GENERATED BY UnitGenerator. DO NOT CHANGE IT.
// </auto-generated>
#pragma warning disable CS8669
using System;

namespace FileGenerate
#pragma warning disable CS8669
using System;namespace FileGenerate
{
[System.ComponentModel.TypeConverter(typeof(BTypeConverter))]
public readonly partial struct B : IEquatable<B>
readonly partial struct B : IEquatable<B>
{
readonly string value;

Expand All @@ -17,18 +12,17 @@ public B(string value)
{
this.value = value;
}


public static explicit operator string(B value)

public static implicit operator string(B value)
{
return value.value;
}

public static explicit operator B(string value)
public static implicit operator B(string value)
{
return new B(value);
}

public bool Equals(B other)
{
return value.Equals(other.value);
Expand All @@ -47,19 +41,19 @@ public override bool Equals(object obj)
return value.Equals((string)obj);
}

return value.Equals(obj);
return value.Equals(obj);
}

public override int GetHashCode()
{
return value.GetHashCode();
}

public override string ToString()
{
return "B(" + value + ")";
return value.ToString();
}

public static bool operator ==(in B x, in B y)
{
return x.value.Equals(y.value);
Expand All @@ -70,15 +64,6 @@ public override string ToString()
return !x.value.Equals(y.value);
}










// Default
private class BTypeConverter : System.ComponentModel.TypeConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// <auto-generated>
// THIS (.cs) FILE IS GENERATED BY UnitGenerator. DO NOT CHANGE IT.
// </auto-generated>
#pragma warning disable CS8669
#pragma warning disable CS8669
#pragma warning disable CS8625
using System;

namespace UnitGenerator
{
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)]
Expand Down Expand Up @@ -37,5 +33,7 @@ internal enum UnitGenerateOptions
MessagePackFormatter = 256,
DapperTypeHandler = 512,
EntityFrameworkValueConverter = 1024,
WithoutComparisonOperator = 2048,
JsonConverterDictionaryKeySupport = 4096
}
}
Loading

0 comments on commit 79da641

Please sign in to comment.