Ejemplo n.º 1
0
        /// <summary>
        /// Creates an instance of <typeparamref name="T"/> that will route method calls through the provided host adapter.
        /// </summary>
        /// <param name="adapter">The host adapter to route calls through.</param>
        /// <returns>
        /// An object instance implementing <typeparamref name="T"/> that will route calls through <c>adapter</c>.
        /// </returns>
        /// <typeparam name="T">The segmented contract type whose calls will be routed through the proxy.</typeparam>
        public static T Create <T>(IHostAdapter adapter)
            where T : class
        {
            Require.NotNull(adapter, nameof(adapter));

            object proxy         = Create <T, RoutableProxy>();
            var    routableProxy = (RoutableProxy)proxy;

            routableProxy._adapter = adapter;

            return((T)proxy);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes new instance of the <see cref="DockWindow"/> class.
 /// </summary>
 public DockWindow()
 {
     _hostAdapter = new HostAdapter(this);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes new instance of the <see cref="DockWindow"/> class.
 /// </summary>
 public DockWindow()
 {
     _id          = nameof(IDockWindow);
     _title       = nameof(IDockWindow);
     _hostAdapter = new HostAdapter(this);
 }