public ExplicitInterfaceClient(ExplicitInterfaceImplementation implementationReference, ISimpleInterface interfaceReference)
        {
            // Uncommenting this will cause compilation errors.
            //var instancePropertyValue = implementationReference.ThisIntegerPropertyOnlyNeedsAGetter;
            //implementationReference.ThisMethodRequiresImplementation();
            //implementationReference.ThisStringPropertyNeedsImplementingToo = "Hello";
            //implementationReference.InterfacesCanContainEventsToo += EventHandler;

            var interfacePropertyValue = interfaceReference.ThisIntegerPropertyOnlyNeedsAGetter;
            interfaceReference.ThisMethodRequiresImplementation();
            interfaceReference.ThisStringPropertyNeedsImplementingToo = "Hello";
            interfaceReference.InterfacesCanContainEventsToo += EventHandler;
        }
Example #2
0
        public ImplicitInterfaceClient(SimpleInterfaceImplementation implementationReference, ISimpleInterface interfaceReference)
        {
            var instancePropertyValue = implementationReference.ThisIntegerPropertyOnlyNeedsAGetter;

            implementationReference.ThisMethodRequiresImplementation();
            implementationReference.ThisStringPropertyNeedsImplementingToo = "Hello";
            implementationReference.InterfaceCanContainEventsToo          += EventHandler;

            var interfacePropertyValue = interfaceReference.ThisIntegerPropertyOnlyNeedsAGetter;

            interfaceReference.ThisMethodRequiresImplementation();
            interfaceReference.ThisStringPropertyNeedsImplementingToo = "Hello";
            interfaceReference.InterfaceCanContainEventsToo          += EventHandler;
        }
        public ExplicitInterfaceClient(ExplicitInterfaceImplementation implementationReference, ISimpleInterface interfaceReference)
        {
            //Uncommenting this will cause compilation errors.
            //var instancePropertyValue = implementationReference.ThisIntegerPropertyOnlyNeedsAGetter;
            //implementationReference.ThisMethodRequiresImplementation();
            //implementationReference.ThisStringPropertyNeedsImplementingToo = "Hello";
            //implementationReference.InterfacesCanContainEventsToo += EventHandler;

            var interfacePropertyValue = interfaceReference.ThisIntegerPropertyOnlyNeedsAGetter;

            interfaceReference.ThisMethodRequiresImplementation();
            interfaceReference.ThisStringPropertyNeedsImplementingToo = "Hello";
            interfaceReference.InterfaceCanContainEventsToo          += EventHandler;
        }