-
-
Save yuta-kaseda/77545c44bf6d16c8f060765a6bea2beb to your computer and use it in GitHub Desktop.
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
public class ReferenceClass | |
{ | |
public ReferenceClass() | |
{ | |
} | |
} | |
public class NotReferenceClass | |
{ | |
public NotReferenceClass() | |
{ | |
} | |
} | |
public class BindClass | |
{ | |
public BincClass(ReferenceClass rc,NotReferenceClass nrc) | |
{ | |
//rcは参照できてる | |
//nrcはnullになっており、参照できていない | |
} | |
} | |
void Bind() | |
{ | |
//ReferenceClassを登録 | |
Container.Bind<ReferenceClass>().AsSingle(); | |
//BindClassを登録 | |
Container.Bind<BindClass>().AsSingle(); | |
//BindClassをインスタンスにする | |
Container.Resolve<BindClass>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment