コード例 #1
0
 CompositionDependency(CompositionContract contract, ExportDescriptorPromise target, bool isPrerequisite, object site)
 {
     _target         = target;
     _isPrerequisite = isPrerequisite;
     _site           = site;
     _contract       = contract;
 }
コード例 #2
0
 private CompositionDependency(CompositionContract contract, ExportDescriptorPromise target, bool isPrerequisite, object site)
 {
     _target = target;
     _isPrerequisite = isPrerequisite;
     _site = site;
     _contract = contract;
 }
コード例 #3
0
        /// <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));
        }
コード例 #4
0
        /// <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));
        }
コード例 #5
0
        /// <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);
        }
コード例 #6
0
        /// <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));
        }
コード例 #7
0
 public void AddPromise(ExportDescriptorPromise promise)
 {
     _results = null;
     _providedDescriptors.Add(promise);
 }
コード例 #8
0
ファイル: UpdateResult.cs プロジェクト: Rayislandstyle/corefx
 public void AddPromise(ExportDescriptorPromise promise)
 {
     _results = null;
     _providedDescriptors.Add(promise);
 }