public override void Initialize() { base.Initialize(); _resolutionScope = this.GetAttributeEnumValue <DiResolutionScope>(ConfigurationFileAttributeNames.Scope); //if (!_configuration.DiManagers.ActiveDiManagerElement.DiManager.SupportsResolutionScope(_resolutionScope)) // throw new ConfigurationParseException(this, $"DI container '{_configuration.DiManagers.ActiveDiManagerElement.DiManager.DiContainerName}' does not support a resolution scope '{resolutionScopeValue}'"); }
public override void ValidateAfterChildrenAdded() { // We need to get the value _valueInitializerElement before calling base.ValidateAfterChildrenAdded(), // since the base class calls Enabled which uses ValueTypeInfo, which is overridden in this class. _resolutionScope = this.GetAttributeEnumValue <DiResolutionScope>(ConfigurationFileAttributeNames.Scope); if (Children.Count > 0) { ValueInitializerElement = Children[0] as IValueInitializerElement; } if (ValueInitializerElement == null) { throw new ConfigurationParseException(this, "Value is missing."); } base.ValidateAfterChildrenAdded(); }
/// <summary> /// Sets the resolution scope. /// </summary> /// <param name="resolutionScope">The resolution scope.</param> /// <returns></returns> public IBindingImplementationNonGeneric SetResolutionScope(DiResolutionScope resolutionScope) { BindingImplementationConfiguration.ResolutionScope = resolutionScope; return(this); }
/// <summary> /// Constructor. /// </summary> /// <param name="selfBindingDiResolutionScope">Resolution scope to use for self binding.</param> public SelfBindingRegistrationResult(DiResolutionScope selfBindingDiResolutionScope) { SelfBindingDiResolutionScope = selfBindingDiResolutionScope; }