-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
176 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...ceGeneratorTests/Destination/ProxyInterfaceSourceGeneratorTests.Source.ITimeProvider.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
//---------------------------------------------------------------------------------------- | ||
// <auto-generated> | ||
// This code was generated by https://github.com/StefH/ProxyInterfaceSourceGenerator. | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//---------------------------------------------------------------------------------------- | ||
|
||
#nullable enable | ||
using System; | ||
|
||
namespace ProxyInterfaceSourceGeneratorTests.Source | ||
{ | ||
public partial interface ITimeProvider | ||
{ | ||
global::System.TimeProvider _Instance { get; } | ||
|
||
global::ProxyInterfaceSourceGeneratorTests.Source.ITimeProvider System { get; } | ||
|
||
global::System.TimeZoneInfo LocalTimeZone { get; } | ||
|
||
long TimestampFrequency { get; } | ||
|
||
global::System.DateTimeOffset GetUtcNow(); | ||
|
||
global::System.DateTimeOffset GetLocalNow(); | ||
|
||
long GetTimestamp(); | ||
|
||
global::System.TimeSpan GetElapsedTime(long startingTimestamp, long endingTimestamp); | ||
|
||
global::System.TimeSpan GetElapsedTime(long startingTimestamp); | ||
|
||
global::System.Threading.ITimer CreateTimer(global::System.Threading.TimerCallback callback, object? state, global::System.TimeSpan dueTime, global::System.TimeSpan period); | ||
} | ||
} | ||
#nullable restore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
tests/ProxyInterfaceSourceGeneratorTests/Destination/System.TimeProviderProxy.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
//---------------------------------------------------------------------------------------- | ||
// <auto-generated> | ||
// This code was generated by https://github.com/StefH/ProxyInterfaceSourceGenerator. | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//---------------------------------------------------------------------------------------- | ||
|
||
#nullable enable | ||
using System; | ||
|
||
namespace ProxyInterfaceSourceGeneratorTests.Source | ||
{ | ||
public partial class TimeProviderProxy : global::ProxyInterfaceSourceGeneratorTests.Source.ITimeProvider | ||
{ | ||
static TimeProviderProxy() | ||
{ | ||
Mapster.TypeAdapterConfig<global::System.TimeProvider, global::ProxyInterfaceSourceGeneratorTests.Source.ITimeProvider>.NewConfig().ConstructUsing(instance98737229 => new global::ProxyInterfaceSourceGeneratorTests.Source.TimeProviderProxy(instance98737229)); | ||
Mapster.TypeAdapterConfig<global::ProxyInterfaceSourceGeneratorTests.Source.ITimeProvider, global::System.TimeProvider>.NewConfig().MapWith(proxy_979750559 => ((global::ProxyInterfaceSourceGeneratorTests.Source.TimeProviderProxy) proxy_979750559)._Instance); | ||
|
||
} | ||
|
||
|
||
public global::System.TimeProvider _Instance { get; } | ||
|
||
public global::ProxyInterfaceSourceGeneratorTests.Source.ITimeProvider System { get => Mapster.TypeAdapter.Adapt<global::ProxyInterfaceSourceGeneratorTests.Source.ITimeProvider>(global::System.TimeProvider.System); } | ||
|
||
public virtual global::System.TimeZoneInfo LocalTimeZone { get => _Instance.LocalTimeZone; } | ||
|
||
public virtual long TimestampFrequency { get => _Instance.TimestampFrequency; } | ||
|
||
public virtual global::System.DateTimeOffset GetUtcNow() | ||
{ | ||
var result__1870298920 = _Instance.GetUtcNow(); | ||
return result__1870298920; | ||
} | ||
|
||
public global::System.DateTimeOffset GetLocalNow() | ||
{ | ||
var result__1410738147 = _Instance.GetLocalNow(); | ||
return result__1410738147; | ||
} | ||
|
||
public virtual long GetTimestamp() | ||
{ | ||
var result__1193196790 = _Instance.GetTimestamp(); | ||
return result__1193196790; | ||
} | ||
|
||
public global::System.TimeSpan GetElapsedTime(long startingTimestamp, long endingTimestamp) | ||
{ | ||
long startingTimestamp_ = startingTimestamp; | ||
long endingTimestamp_ = endingTimestamp; | ||
var result__865310895 = _Instance.GetElapsedTime(startingTimestamp_, endingTimestamp_); | ||
return result__865310895; | ||
} | ||
|
||
public global::System.TimeSpan GetElapsedTime(long startingTimestamp) | ||
{ | ||
long startingTimestamp_ = startingTimestamp; | ||
var result__865310895 = _Instance.GetElapsedTime(startingTimestamp_); | ||
return result__865310895; | ||
} | ||
|
||
public virtual global::System.Threading.ITimer CreateTimer(global::System.Threading.TimerCallback callback, object? state, global::System.TimeSpan dueTime, global::System.TimeSpan period) | ||
{ | ||
global::System.Threading.TimerCallback callback_ = callback; | ||
object? state_ = state; | ||
global::System.TimeSpan dueTime_ = dueTime; | ||
global::System.TimeSpan period_ = period; | ||
var result_1335635543 = _Instance.CreateTimer(callback_, state_, dueTime_, period_); | ||
return result_1335635543; | ||
} | ||
|
||
|
||
public TimeProviderProxy(global::System.TimeProvider instance) | ||
{ | ||
_Instance = instance; | ||
|
||
} | ||
} | ||
} | ||
#nullable restore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
tests/ProxyInterfaceSourceGeneratorTests/Source/ITimeProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace ProxyInterfaceSourceGeneratorTests.Source | ||
{ | ||
public partial interface ITimeProvider | ||
{ | ||
} | ||
} |