コード例 #1
0
 public void AddResolvedInterface(IInterfaceGraphType graphType)
 {
     if (!_resolvedInterfaces.Contains(graphType))
     {
         graphType.IsValidInterfaceFor(this, throwError: true);
         _resolvedInterfaces.Add(graphType ?? throw new ArgumentNullException(nameof(graphType)));
     }
 }
コード例 #2
0
        /// <inheritdoc/>
        public void AddResolvedInterface(IInterfaceGraphType graphType)
        {
            if (graphType == null)
            {
                throw new ArgumentNullException(nameof(graphType));
            }

            _ = graphType.IsValidInterfaceFor(this, throwError: true);
            ResolvedInterfaces.Add(graphType);
        }
コード例 #3
0
        /// <inheritdoc/>
        public void AddResolvedInterface(IInterfaceGraphType graphType)
        {
            if (graphType == null)
            {
                throw new ArgumentNullException(nameof(graphType));
            }

            _ = graphType.IsValidInterfaceFor(this, throwError: true);
            var addMethod = typeof(ResolvedInterfaces).GetMethod("Add");

            addMethod.Invoke(ResolvedInterfaces, new [] { graphType });
        }