-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New injections by factory instance are introduced (See #131).
- Loading branch information
1 parent
507518b
commit 6476930
Showing
22 changed files
with
9,098 additions
and
8,677 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
38463b2339fd0679a7c0651c900a309479770104 | ||
94531e88dcaa6e213f04a19417fb9065151dd70e |
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
19 changes: 19 additions & 0 deletions
19
Source/Definition/Initializer/TyphoonParameterInjectedByComponentFactory.h
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,19 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// TYPHOON FRAMEWORK | ||
// Copyright 2013, Jasper Blues & Contributors | ||
// All Rights Reserved. | ||
// | ||
// NOTICE: The authors permit you to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
#import "TyphoonAbstractInjectedParameter.h" | ||
|
||
@interface TyphoonParameterInjectedByComponentFactory : TyphoonAbstractInjectedParameter | ||
|
||
- (instancetype)initWithParameterIndex:(NSUInteger)parameterIndex; | ||
|
||
@end |
40 changes: 40 additions & 0 deletions
40
Source/Definition/Initializer/TyphoonParameterInjectedByComponentFactory.m
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,40 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// TYPHOON FRAMEWORK | ||
// Copyright 2013, Jasper Blues & Contributors | ||
// All Rights Reserved. | ||
// | ||
// NOTICE: The authors permit you to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
#import "TyphoonParameterInjectedByComponentFactory.h" | ||
|
||
@implementation TyphoonParameterInjectedByComponentFactory | ||
|
||
/* ====================================================================================================================================== */ | ||
#pragma mark - Initialization | ||
|
||
- (instancetype)initWithParameterIndex:(NSUInteger)parameterIndex { | ||
self = [super init]; | ||
if (self) { | ||
_index = parameterIndex; | ||
} | ||
return self; | ||
} | ||
|
||
/* ====================================================================================================================================== */ | ||
#pragma mark - Overrides | ||
|
||
- (id)copyWithZone:(NSZone *)zone { | ||
return [[TyphoonParameterInjectedByComponentFactory alloc] initWithParameterIndex:_index]; | ||
} | ||
|
||
- (void)withFactory:(TyphoonComponentFactory *)factory setArgumentOnInvocation:(NSInvocation *)invocation { | ||
[self setObject:factory forInvocation:invocation]; | ||
} | ||
|
||
|
||
@end |
18 changes: 18 additions & 0 deletions
18
Source/Definition/Properties/TyphoonPropertyInjectedByComponentFactory.h
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,18 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// TYPHOON FRAMEWORK | ||
// Copyright 2013, Jasper Blues & Contributors | ||
// All Rights Reserved. | ||
// | ||
// NOTICE: The authors permit you to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
#import "TyphoonAbstractInjectedProperty.h" | ||
|
||
@interface TyphoonPropertyInjectedByComponentFactory : TyphoonAbstractInjectedProperty | ||
|
||
- (instancetype) initWithName:(NSString *)name; | ||
|
||
@end |
34 changes: 34 additions & 0 deletions
34
Source/Definition/Properties/TyphoonPropertyInjectedByComponentFactory.m
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,34 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// TYPHOON FRAMEWORK | ||
// Copyright 2013, Jasper Blues & Contributors | ||
// All Rights Reserved. | ||
// | ||
// NOTICE: The authors permit you to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
#import "TyphoonPropertyInjectedByComponentFactory.h" | ||
|
||
@implementation TyphoonPropertyInjectedByComponentFactory | ||
|
||
/* ====================================================================================================================================== */ | ||
#pragma mark - Initialization | ||
|
||
- (instancetype)initWithName:(NSString *)name { | ||
self = [super init]; | ||
if (self) { | ||
_name = name; | ||
} | ||
return self; | ||
} | ||
|
||
/* ====================================================================================================================================== */ | ||
#pragma mark - Overrides | ||
|
||
- (id)withFactory:(TyphoonComponentFactory *)factory computeValueToInjectOnInstance:(id)instance { | ||
return factory; | ||
} | ||
|
||
@end |
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
Oops, something went wrong.