CompositionDependency(CompositionContract contract, ExportDescriptorPromise target, bool isPrerequisite, object site) { _target = target; _isPrerequisite = isPrerequisite; _site = site; _contract = contract; }
private CompositionDependency(CompositionContract contract, ExportDescriptorPromise target, bool isPrerequisite, object site) { _target = target; _isPrerequisite = isPrerequisite; _site = site; _contract = contract; }
/// <summary> /// Construct a dependency on the specified target. /// </summary> /// <param name="target">The export descriptor promise from another part /// that this part is dependent on.</param> /// <param name="isPrerequisite">True if the dependency is a prerequisite /// that must be satisfied before any exports can be retrieved from the dependent /// part; otherwise, false.</param> /// <param name="site">A marker used to identify the individual dependency among /// those on the dependent part.</param> /// <param name="contract">The contract required by the dependency.</param> public static CompositionDependency Satisfied(CompositionContract contract, ExportDescriptorPromise target, bool isPrerequisite, object site) { Requires.ArgumentNotNull(target, "target"); Requires.ArgumentNotNull(site, "site"); Requires.ArgumentNotNull(contract, "contract"); return(new CompositionDependency(contract, target, isPrerequisite, site)); }
/// <summary> /// Construct a dependency on the specified target. /// </summary> /// <param name="target">The export descriptor promise from another part /// that this part is dependent on.</param> /// <param name="isPrerequisite">True if the dependency is a prerequisite /// that must be satisfied before any exports can be retrieved from the dependent /// part; otherwise, false.</param> /// <param name="site">A marker used to identify the individual dependency among /// those on the dependent part.</param> /// <param name="contract">The contract required by the dependency.</param> public static CompositionDependency Satisfied(CompositionContract contract, ExportDescriptorPromise target, bool isPrerequisite, object site) { Requires.NotNull(target, nameof(target)); Requires.NotNull(site, nameof(site)); Requires.NotNull(contract, nameof(contract)); return(new CompositionDependency(contract, target, isPrerequisite, site)); }
/// <summary> /// Construct a dependency on the specified target. /// </summary> /// <param name="target">The export descriptor promise from another part /// that this part is dependent on.</param> /// <param name="isPrerequisite">True if the dependency is a prerequisite /// that must be satisfied before any exports can be retrieved from the dependent /// part; otherwise, false.</param> /// <param name="site">A marker used to identify the individual dependency among /// those on the dependent part.</param> /// <param name="contract">The contract required by the dependency.</param> public static CompositionDependency Satisfied(CompositionContract contract, ExportDescriptorPromise target, bool isPrerequisite, object site) { Requires.NotNull(target, nameof(target)); Requires.NotNull(site, nameof(site)); Requires.NotNull(contract, nameof(contract)); return new CompositionDependency(contract, target, isPrerequisite, site); }
/// <summary> /// Construct a dependency on the specified target. /// </summary> /// <param name="target">The export descriptor promise from another part /// that this part is dependent on.</param> /// <param name="isPrerequisite">True if the dependency is a prerequisite /// that must be satisfied before any exports can be retrieved from the dependent /// part; otherwise, false.</param> /// <param name="site">A marker used to identify the individual dependency among /// those on the dependent part.</param> /// <param name="contract">The contract required by the dependency.</param> public static CompositionDependency Satisfied(CompositionContract contract, ExportDescriptorPromise target, bool isPrerequisite, object site) { if (contract is null) { throw new ArgumentNullException(nameof(contract)); } if (target is null) { throw new ArgumentNullException(nameof(target)); } if (site is null) { throw new ArgumentNullException(nameof(site)); } return(new CompositionDependency(contract, target, isPrerequisite, site)); }
public void AddPromise(ExportDescriptorPromise promise) { _results = null; _providedDescriptors.Add(promise); }