-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from wieslawsoltes/CrossAssembly
Cross assembly support
- Loading branch information
Showing
82 changed files
with
1,563 additions
and
175 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
89 changes: 89 additions & 0 deletions
89
.../Snapshots/CrossAssemblyTests.BaseHasNoAttributes_DerivedHasPropertyReactive.verified.txt
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,89 @@ | ||
{ | ||
Sources: [ | ||
{ | ||
FileName: IgnoreReactiveAttribute.g.cs, | ||
Source: | ||
using System; | ||
|
||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = false, AllowMultiple = false)] | ||
sealed class IgnoreReactiveAttribute : Attribute | ||
{ | ||
public IgnoreReactiveAttribute() { } | ||
} | ||
}, | ||
{ | ||
FileName: MainLib.DerivedClass.INPC.g.cs, | ||
Source: | ||
// <auto-generated/> | ||
#nullable enable | ||
|
||
using System.ComponentModel; | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace MainLib | ||
{ | ||
public partial class DerivedClass : INotifyPropertyChanged | ||
{ | ||
public event PropertyChangedEventHandler? PropertyChanged; | ||
|
||
protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null) | ||
{ | ||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | ||
} | ||
|
||
protected virtual void OnPropertyChanged(PropertyChangedEventArgs args) | ||
{ | ||
PropertyChanged?.Invoke(this, args); | ||
} | ||
} | ||
} | ||
|
||
}, | ||
{ | ||
FileName: MainLib.DerivedClass.ReactiveProperties.g.cs, | ||
Source: | ||
// <auto-generated/> | ||
#nullable enable | ||
|
||
using System.ComponentModel; | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace MainLib | ||
{ | ||
/// <summary> | ||
/// A partial class implementation for MainLib.DerivedClass. | ||
/// </summary> | ||
public partial class DerivedClass | ||
{ | ||
private static readonly PropertyChangedEventArgs _reactivePropChangedEventArgs = new PropertyChangedEventArgs(nameof(ReactiveProp)); | ||
|
||
public partial string ReactiveProp | ||
{ | ||
get => field; | ||
set | ||
{ | ||
if (!Equals(field, value)) | ||
{ | ||
field = value; | ||
OnPropertyChanged(_reactivePropChangedEventArgs); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
}, | ||
{ | ||
FileName: ReactiveAttribute.g.cs, | ||
Source: | ||
using System; | ||
|
||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = true, AllowMultiple = false)] | ||
sealed class ReactiveAttribute : Attribute | ||
{ | ||
public ReactiveAttribute() { } | ||
} | ||
} | ||
], | ||
Diagnostics: null | ||
} |
89 changes: 89 additions & 0 deletions
89
...or.Tests/Snapshots/CrossAssemblyTests.BaseHasNoAttributes_DerivedHasReactive.verified.txt
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,89 @@ | ||
{ | ||
Sources: [ | ||
{ | ||
FileName: IgnoreReactiveAttribute.g.cs, | ||
Source: | ||
using System; | ||
|
||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = false, AllowMultiple = false)] | ||
sealed class IgnoreReactiveAttribute : Attribute | ||
{ | ||
public IgnoreReactiveAttribute() { } | ||
} | ||
}, | ||
{ | ||
FileName: MainLib.DerivedClass.INPC.g.cs, | ||
Source: | ||
// <auto-generated/> | ||
#nullable enable | ||
|
||
using System.ComponentModel; | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace MainLib | ||
{ | ||
public partial class DerivedClass : INotifyPropertyChanged | ||
{ | ||
public event PropertyChangedEventHandler? PropertyChanged; | ||
|
||
protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null) | ||
{ | ||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | ||
} | ||
|
||
protected virtual void OnPropertyChanged(PropertyChangedEventArgs args) | ||
{ | ||
PropertyChanged?.Invoke(this, args); | ||
} | ||
} | ||
} | ||
|
||
}, | ||
{ | ||
FileName: MainLib.DerivedClass.ReactiveProperties.g.cs, | ||
Source: | ||
// <auto-generated/> | ||
#nullable enable | ||
|
||
using System.ComponentModel; | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace MainLib | ||
{ | ||
/// <summary> | ||
/// A partial class implementation for MainLib.DerivedClass. | ||
/// </summary> | ||
public partial class DerivedClass | ||
{ | ||
private static readonly PropertyChangedEventArgs _derivedPropChangedEventArgs = new PropertyChangedEventArgs(nameof(DerivedProp)); | ||
|
||
public partial string DerivedProp | ||
{ | ||
get => field; | ||
set | ||
{ | ||
if (!Equals(field, value)) | ||
{ | ||
field = value; | ||
OnPropertyChanged(_derivedPropChangedEventArgs); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
}, | ||
{ | ||
FileName: ReactiveAttribute.g.cs, | ||
Source: | ||
using System; | ||
|
||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = true, AllowMultiple = false)] | ||
sealed class ReactiveAttribute : Attribute | ||
{ | ||
public ReactiveAttribute() { } | ||
} | ||
} | ||
], | ||
Diagnostics: null | ||
} |
75 changes: 75 additions & 0 deletions
75
...tor.Tests/Snapshots/CrossAssemblyTests.BaseHasPartialReactive_DerivedExtends.verified.txt
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,75 @@ | ||
{ | ||
Sources: [ | ||
{ | ||
FileName: IgnoreReactiveAttribute.g.cs, | ||
Source: | ||
using System; | ||
|
||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = false, AllowMultiple = false)] | ||
sealed class IgnoreReactiveAttribute : Attribute | ||
{ | ||
public IgnoreReactiveAttribute() { } | ||
} | ||
}, | ||
{ | ||
FileName: MainLib.DerivedClass.ReactiveProperties.g.cs, | ||
Source: | ||
// <auto-generated/> | ||
#nullable enable | ||
|
||
using System.ComponentModel; | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace MainLib | ||
{ | ||
/// <summary> | ||
/// A partial class implementation for MainLib.DerivedClass. | ||
/// </summary> | ||
public partial class DerivedClass | ||
{ | ||
private static readonly PropertyChangedEventArgs _virtualPropChangedEventArgs = new PropertyChangedEventArgs(nameof(VirtualProp)); | ||
private static readonly PropertyChangedEventArgs _derivedPropChangedEventArgs = new PropertyChangedEventArgs(nameof(DerivedProp)); | ||
|
||
public partial string VirtualProp | ||
{ | ||
get => field; | ||
set | ||
{ | ||
if (!Equals(field, value)) | ||
{ | ||
field = value; | ||
OnPropertyChanged(_virtualPropChangedEventArgs); | ||
} | ||
} | ||
} | ||
|
||
public partial string DerivedProp | ||
{ | ||
get => field; | ||
set | ||
{ | ||
if (!Equals(field, value)) | ||
{ | ||
field = value; | ||
OnPropertyChanged(_derivedPropChangedEventArgs); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
}, | ||
{ | ||
FileName: ReactiveAttribute.g.cs, | ||
Source: | ||
using System; | ||
|
||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = true, AllowMultiple = false)] | ||
sealed class ReactiveAttribute : Attribute | ||
{ | ||
public ReactiveAttribute() { } | ||
} | ||
} | ||
], | ||
Diagnostics: null | ||
} |
27 changes: 27 additions & 0 deletions
27
.../Snapshots/CrossAssemblyTests.BaseHasPropertyReactive_DerivedHasNoAttributes.verified.txt
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,27 @@ | ||
{ | ||
Sources: [ | ||
{ | ||
FileName: IgnoreReactiveAttribute.g.cs, | ||
Source: | ||
using System; | ||
|
||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = false, AllowMultiple = false)] | ||
sealed class IgnoreReactiveAttribute : Attribute | ||
{ | ||
public IgnoreReactiveAttribute() { } | ||
} | ||
}, | ||
{ | ||
FileName: ReactiveAttribute.g.cs, | ||
Source: | ||
using System; | ||
|
||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = true, AllowMultiple = false)] | ||
sealed class ReactiveAttribute : Attribute | ||
{ | ||
public ReactiveAttribute() { } | ||
} | ||
} | ||
], | ||
Diagnostics: null | ||
} |
27 changes: 27 additions & 0 deletions
27
....Tests/Snapshots/CrossAssemblyTests.BaseHasReactive_DerivedHasIgnoreReactive.verified.txt
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,27 @@ | ||
{ | ||
Sources: [ | ||
{ | ||
FileName: IgnoreReactiveAttribute.g.cs, | ||
Source: | ||
using System; | ||
|
||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = false, AllowMultiple = false)] | ||
sealed class IgnoreReactiveAttribute : Attribute | ||
{ | ||
public IgnoreReactiveAttribute() { } | ||
} | ||
}, | ||
{ | ||
FileName: ReactiveAttribute.g.cs, | ||
Source: | ||
using System; | ||
|
||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = true, AllowMultiple = false)] | ||
sealed class ReactiveAttribute : Attribute | ||
{ | ||
public ReactiveAttribute() { } | ||
} | ||
} | ||
], | ||
Diagnostics: null | ||
} |
75 changes: 75 additions & 0 deletions
75
...apshots/CrossAssemblyTests.BaseHasReactive_DerivedHasMixedPropertyAttributes.verified.txt
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,75 @@ | ||
{ | ||
Sources: [ | ||
{ | ||
FileName: IgnoreReactiveAttribute.g.cs, | ||
Source: | ||
using System; | ||
|
||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = false, AllowMultiple = false)] | ||
sealed class IgnoreReactiveAttribute : Attribute | ||
{ | ||
public IgnoreReactiveAttribute() { } | ||
} | ||
}, | ||
{ | ||
FileName: MainLib.DerivedClass.ReactiveProperties.g.cs, | ||
Source: | ||
// <auto-generated/> | ||
#nullable enable | ||
|
||
using System.ComponentModel; | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace MainLib | ||
{ | ||
/// <summary> | ||
/// A partial class implementation for MainLib.DerivedClass. | ||
/// </summary> | ||
public partial class DerivedClass | ||
{ | ||
private static readonly PropertyChangedEventArgs _inheritedReactivePropChangedEventArgs = new PropertyChangedEventArgs(nameof(InheritedReactiveProp)); | ||
private static readonly PropertyChangedEventArgs _explicitReactivePropChangedEventArgs = new PropertyChangedEventArgs(nameof(ExplicitReactiveProp)); | ||
|
||
public partial string InheritedReactiveProp | ||
{ | ||
get => field; | ||
set | ||
{ | ||
if (!Equals(field, value)) | ||
{ | ||
field = value; | ||
OnPropertyChanged(_inheritedReactivePropChangedEventArgs); | ||
} | ||
} | ||
} | ||
|
||
public partial string ExplicitReactiveProp | ||
{ | ||
get => field; | ||
set | ||
{ | ||
if (!Equals(field, value)) | ||
{ | ||
field = value; | ||
OnPropertyChanged(_explicitReactivePropChangedEventArgs); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
}, | ||
{ | ||
FileName: ReactiveAttribute.g.cs, | ||
Source: | ||
using System; | ||
|
||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = true, AllowMultiple = false)] | ||
sealed class ReactiveAttribute : Attribute | ||
{ | ||
public ReactiveAttribute() { } | ||
} | ||
} | ||
], | ||
Diagnostics: null | ||
} |
Oops, something went wrong.