VS.net 2005 问一小段代码的调用关系.
public class TabularEventLog
{
[SqlFunction(FillRowMethodName = "FillRow")]
public static IEnumerable InitMethod(String logname)
{
return new EventLog(logname, Environment.MachineName).Entries;
}
public static void FillRow(Object obj, out SqlDateTime timeWritten, out SqlChars message, out SqlChars category, out long instanceId)
{
EventLogEntry eventLogEntry = (EventLogEntry)obj;
timeWritten = new SqlDateTime(eventLogEntry.TimeWritten);
message = new SqlChars(eventLogEntry.Message);
category = new SqlChars(eventLogEntry.Category);
instanceId = eventLogEntry.InstanceId;
}
}
1: [SqlFunction(FillRowMethodName = "FillRow")] 是啥意思?
2: IEnumerable InitMethod 该接口是怎么调用方法 FillRow 的?
3: return new EventLog(logname, Environment.MachineName).Entries; 是实现什么功能
4: static void FillRow 是怎么返回的?返回给哪个调用者?
谢谢!