本文整理汇总了C#中LogDelegate类的典型用法代码示例。如果您正苦于以下问题:C# LogDelegate类的具体用法?C# LogDelegate怎么用?C# LogDelegate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LogDelegate类属于命名空间,在下文中一共展示了LogDelegate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TThreadPoolServer
public TThreadPoolServer(TProcessor processor, TServerTransport serverTransport, LogDelegate logDelegate)
: this(new TSingletonProcessorFactory(processor), serverTransport,
new TTransportFactory(), new TTransportFactory(),
new TBinaryProtocol.Factory(), new TBinaryProtocol.Factory(),
DEFAULT_MIN_THREADS, DEFAULT_MAX_THREADS, logDelegate)
{
}
示例2: TThreadPoolServer
public TThreadPoolServer(Processor processor, ServerTransport serverTransport, LogDelegate logDelegate)
: this(processor, serverTransport,
new TransportFactory(), new TransportFactory(),
new BinaryProtocol.Factory(), new BinaryProtocol.Factory(),
DEFAULT_MIN_THREADS, DEFAULT_MAX_THREADS, logDelegate)
{
}
示例3: TThreadedServer
public TThreadedServer(TProcessor processor, TServerTransport serverTransport, LogDelegate logDelegate)
: this(processor, serverTransport,
new TTransportFactory(), new TTransportFactory(),
new TBinaryProtocol.Factory(), new TBinaryProtocol.Factory(),
DEFAULT_MAX_THREADS, logDelegate)
{
}
示例4: ReceiveCallback
public void ReceiveCallback(IAsyncResult ar)
{
LogDelegate log = new LogDelegate(this.Bench.Log);
try
{
UdpClient u = (UdpClient)((UdpState)(ar.AsyncState)).u;
IPEndPoint e = (IPEndPoint)((UdpState)(ar.AsyncState)).e;
Byte[] receiveBytes = u.EndReceive(ar, ref e);
string receiveString = Encoding.ASCII.GetString(receiveBytes);
UDPResponse = Encoding.ASCII.GetString(receiveBytes, 0, receiveBytes.Length);
string verboseLog = "Received broadcast from " + e.ToString() + ":\n" + UDPResponse + "\n";
log(verboseLog);
Console.WriteLine("Received: {0}", receiveString);
messageReceived = true;
}
catch (Exception e)
{
UDPResponse = "";
log(e.ToString());
}
}
示例5: TServer
public TServer(TProcessor processor,
TServerTransport serverTransport,
LogDelegate logDelegate)
: this(
processor, serverTransport, new TTransportFactory(), new TTransportFactory(), new TBinaryProtocol.Factory(),
new TBinaryProtocol.Factory(), DefaultLogDelegate)
{
}
示例6: MultiConverterModel
public MultiConverterModel(Part part, Vessel vessel, LogDelegate logDelegate)
{
this.part = part;
this.vessel = vessel;
this.logDelegate = logDelegate;
this.converters = new List<ModuleResourceConverter>();
}
示例7: Logger
internal Logger(string name, ILogger logger, ConfigSource config)
{
this.name = name;
this.logger = logger;
this.config = config;
logDelegate = new LogDelegate(Log);
}
示例8: TSimpleServer
public TSimpleServer(TProcessor processor,
TServerTransport serverTransport,
LogDelegate logDel)
: base(
processor, serverTransport, new TTransportFactory(), new TTransportFactory(), new TBinaryProtocol.Factory(),
new TBinaryProtocol.Factory(), logDel)
{
}
示例9: FormServers
public FormServers()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
logDelegate=new LogDelegate(m_Log);
m_Globalize();
}
示例10: Log
public void Log( string message ) {
if( this.textBox1.InvokeRequired ) {
LogDelegate d = new LogDelegate( LogInternal );
this.Invoke
( d, new object[] { message } );
} else {
LogInternal( message );
}
}
示例11: PacketSniffer
public PacketSniffer(LogDelegate logDelegate)
{
Log = logDelegate;
aborting = false;
device = null;
packetLock = new object();
packetAvailiable = new AutoResetEvent(false);
disposed = false;
}
示例12: LoggerSql
public LoggerSql(SqlConnection connection, LogDelegate logCommand)
{
if (connection == null)
throw new ArgumentNullException("The SQL connection was null when passed into LoggerSql");
if (logCommand == null)
throw new ArgumentNullException("No LogDelegate was specified on the constructor to LoggerSql");
this.connection = connection;
this.logCommand = logCommand;
this.Count = 0;
}
示例13: TServerAsync
public TServerAsync(TProcessorAsync processor,
TServerTransportAsync serverTransport,
LogDelegate logDelegate)
: this(processor,
serverTransport,
new TTransportFactoryAsync(),
new TTransportFactoryAsync(),
new TCompactProtocolAsync.Factory(),
new TCompactProtocolAsync.Factory(),
logDelegate)
{
}
示例14: newCommand
public void newCommand(string p)
{
if (txtCommandsUsed.InvokeRequired)
{
LogDelegate d = new LogDelegate(newCommand);
this.Invoke(d, new object[] { p });
}
else
{
txtCommandsUsed.AppendTextAndScroll(p);
}
}
示例15: log
public void log(string message)
{
if (this.InvokeRequired)
{
LogDelegate d = new LogDelegate(log);
this.Invoke(d, new object[] { message });
}
else
{
txtLog.AppendText(Environment.NewLine + message);
}
}