-
Notifications
You must be signed in to change notification settings - Fork 0
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
14 changed files
with
157 additions
and
11 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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
Assets/UniDITestScripts/LocalScopeTests/LocalConsumerClass.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,13 @@ | ||
namespace UniDI.Test | ||
{ | ||
public class LocalConsumerClass | ||
{ | ||
public LocalInjectedClass LocalInjectedClass; | ||
|
||
[Inject] | ||
private void Init(LocalInjectedClass localInjectedClass) | ||
{ | ||
LocalInjectedClass = localInjectedClass; | ||
} | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
Assets/UniDITestScripts/LocalScopeTests/LocalConsumerClass.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
Assets/UniDITestScripts/LocalScopeTests/LocalInjectedClass.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,12 @@ | ||
namespace UniDI.Test | ||
{ | ||
public class LocalInjectedClass | ||
{ | ||
public int Value; | ||
|
||
public LocalInjectedClass(int value) | ||
{ | ||
Value = value; | ||
} | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
Assets/UniDITestScripts/LocalScopeTests/LocalInjectedClass.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
Assets/UniDITestScripts/LocalScopeTests/LocalScopeTester.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,23 @@ | ||
using UnityEngine; | ||
|
||
namespace UniDI.Test | ||
{ | ||
public class LocalScopeTester : MonoBehaviour | ||
{ | ||
private void Start() | ||
{ | ||
var injected1 = new LocalInjectedClass(1); | ||
var injected2 = new LocalInjectedClass(2); | ||
injected1.Inject(1); | ||
injected2.Inject(2); | ||
|
||
var consumer1 = new LocalConsumerClass(); | ||
var consumer2 = new LocalConsumerClass(); | ||
consumer1.Resolve(1); | ||
consumer2.Resolve(2); | ||
|
||
Debug.Log($"consumer1: {consumer1.LocalInjectedClass.Value}"); | ||
Debug.Log($"consumer2: {consumer2.LocalInjectedClass.Value}"); | ||
} | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
Assets/UniDITestScripts/LocalScopeTests/LocalScopeTester.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 1 addition & 2 deletions
3
Assets/UniDITestScripts/PerformanceTests/PerformanceTestStarter.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
6 changes: 2 additions & 4 deletions
6
Assets/UniDITestScripts/PerformanceTests/PerformanceTester.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