您是否了解过WCF路由器服务4.0?
我知道这个新功能有很多优点,但我对它有一些疑问......
答案 0 :(得分:1)
3.喜欢cisco路由器 你必须改变例1:
InstanceContext ctx = new InstanceContext(_CallBack); _Client = new DuplexChannelFactory(ctx,_EndpointName); _Client.Open();
/**
* Change date format to "since" string
* */
public static String timeSince(String dateString) {
Date date = stringToDate(dateString);
String result = (DateUtils.getRelativeTimeSpanString(date.getTime())).toString();
return result;
}
/**
* Function to convert server date string to Date
* */
public static Date stringToDate(String s){
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
try {
return df.parse(s);
} catch(ParseException e){
e.printStackTrace();
}
return null;
}