Пример #1
0
 public ProtocolSpecification(ConnectionBase connection, Type invokeType)
 {
     InvokeObject = (IInvokeProtocol)Activator.CreateInstance(invokeType, connection);
 }
Пример #2
0
        //public ProtocolContainer(ConnectionBase connection, Type implType, Type objType)
        //{
        //    ImplementationType = implType;
        //    ImplementationObject = Activator.CreateInstance(objType, connection);
        //    InvokeObject =  (IInvokeProtocol)ImplementationObject;
        //}

        public ProtocolSpecification(ConnectionBase connection, Type implType, Type invokeType)
        {
            ImplementationType   = implType;
            InvokeObject         = (IInvokeProtocol)Activator.CreateInstance(invokeType, connection);
            ImplementationObject = Activator.CreateInstance(ImplementationType, InvokeObject);
        }