public object?GetGetObject( Type requestedType, IResolutionRequest resolutionRequest ) { var index = CalculateIndex(requestedType); if (_table.Length > index) { var list = _table[index]; for (var i = 0; i < list.Length; i++) { var item = list[i]; if (item.Type == requestedType) { return(item.Factory(resolutionRequest)); } } } throw new DpdtException( DpdtExceptionTypeEnum.NoBindingAvailable, $"No bindings available for {requestedType.FullName}", requestedType.FullName ! ); }
public ResolutionTarget( IResolutionRequest parentRequest ) { if (parentRequest is null) { throw new ArgumentNullException(nameof(parentRequest)); } ParentRequest = parentRequest; }
public T GetToChild <T>(IResolutionRequest resolutionRequest) { if (!(this is IResolution <T> r)) { if (_parentCluster is null) { RaiseNoBindingAvailable <T>(); } return(_parentCluster.GetToChild <T>( resolutionRequest )); } return(r.Get( resolutionRequest )); }
T ICluster.GetToChild <T>(IResolutionRequest resolutionRequest) { throw new NotImplementedException(); }
public T1 GetToChild <T1>(IResolutionRequest resolutionRequest) { throw new NotImplementedException(); }