} //end Server Property /* Extracted so it can be called from either Server or * Prototype based on what is called first. */ protected void makeServer() { //build the full type string string factType = "GNT.Endpoint." + proto + "." + proto + "Factory"; //get the type Type t = Type.GetType(factType); //get the Instance property and invoke it PropertyInfo inst = t.GetProperty("Instance", BindingFlags.Public | BindingFlags.Static); MethodInfo getter = inst.GetMethod; AbsEndptFactory fact = (getter.Invoke(null, null) as AbsEndptFactory); //create and save the server AbsServerEndpt srvr = null; if (!isEmpty(serverType)) { srvr = fact.CreateServer(serverType); } else { srvr = fact.CreateServer(); } eng.Server = srvr; //mark the server as available done += SERVER_SET; } //end makeServer
} //end Client Property /* Extracted so it can be called from either Client or * Prototype based on what is called first. */ protected void makeClient() { //build the full type string string factType = "GNT.Endpoint." + proto + "." + proto + "Factory"; //get the type Type t = Type.GetType(factType); //get the Instance property and invoke it PropertyInfo inst = t.GetProperty("Instance", BindingFlags.Public | BindingFlags.Static); MethodInfo getter = inst.GetMethod; AbsEndptFactory fact = (getter.Invoke(null, null) as AbsEndptFactory); //create and save the client AbsClientEndpt client = null; if (!isEmpty(clientType)) { client = fact.CreateClient(clientType); } else { client = fact.CreateClient(); } eng.Client = client; //mark the client as available done += CLIENT_SET; } //end makeClient