AppServer svr = (AppServer)Activator.GetObject( typeof(StatViewerServer), "http://myserver/myroot/statviewerserver.rem");
StatView _sv = svr.CreateStatView();
svr.UpdateStatView(_sv);
_______________________________
Another approach: create a similar class on the client
public class StatView
{
string m_statName;
eStatType m_statType;
public StatView()
{
AppServer svr = (AppServer)Activator.GetObject( typeof(StatViewerServer), "http://myserver/myroot/statviewerserver.rem");
object[] _svItems = svr.CreateStatViewDefaults();
m_statName = _svItems[0].ToString();
m_statType = (eStatType)_svItems[1];
}
}
________________
Another approach: use static methods
public StatView()
{
public static StatView CreateStatView()
{
AppServer svr = (AppServer)Activator.GetObject( typeof(StatViewerServer), "http://myserver/myroot/statviewerserver.rem");
return svr.CreateStatView();
}
}
Niciun comentariu:
Trimiteți un comentariu