示例#1
0
 private static ProxyObject CreateObject <T>(long id, IProxyHandler handler) where T : class
 => (ProxyObject)(object)ProxyGenerator <T> .CreateProxy(id, handler);
示例#2
0
 /// <summary>
 /// Creates a transparent proxy of the specified type, returning it as a ProxyObject
 /// </summary>
 /// <typeparam name="T">The type to make a transparent proxy of</param>
 /// <param name="id">The id to pass the proxy</param>
 /// <param name="handler">The handler that will manage the proxy</param>
 /// <returns>A proxy object implementing the specified interface</returns>
 public static T CreateProxy <T>(long id, IProxyHandler handler) where T : class
 => ProxyGenerator <T> .CreateProxy(id, handler);