public DifferentConstructors(IFirstInterface firstInterface, ISecondInterface secondInterface)
        {
            if(firstInterface == null)
                throw new ArgumentNullException("firstInterface");

            if(secondInterface == null)
                throw new ArgumentNullException("secondInterface");

            this._firstInterface = firstInterface;
            this._secondInterface = secondInterface;
        }
Example #2
0
 public void Handle(ISecondInterface message)
 {
     SecondMessageHandled = true;
     PossiblyRaiseEvent();
 }
 public DifferentConstructors(ISecondInterface secondInterface)
     : this(FirstClass.Instance, secondInterface)
 {
 }
 public MoreComplicatedClassThatCantBeFullySatisfied(ISecondInterface paramOne, IFourthInterfaceActuallyDoesntHaveAnyDerivedClasses two)
 {
     ParamOne = paramOne;
     Two      = two;
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ParentWithMultiInterfaceClass"/> class.
 /// </summary>
 /// <param name="firstInterface">The first interface.</param>
 /// <param name="secondInterface">The second interface.</param>
 public ParentWithMultiInterfaceClass(IFirstInterface firstInterface, ISecondInterface secondInterface)
 {
     this.FirstInterface  = firstInterface;
     this.SecondInterface = secondInterface;
 }
Example #6
0
     static void Bar(ISecondInterface secondInterface)                 // Передаём параметром обьект типа данных ISecondInterface
     {
         secondInterface.Action();                                     // Вызываем метод Action() у обьекта типа ISecondInterface
     
 }