本文整理汇总了C#中LogDelegate类的典型用法代码示例。如果您正苦于以下问题:C# LogDelegate类的具体用法?C# LogDelegate怎么用?C# LogDelegate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LogDelegate类属于命名空间,在下文中一共展示了LogDelegate类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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)
{
}
开发者ID:ConfusedReality,项目名称:pkg_serialization_thrift,代码行数:7,代码来源:TThreadPoolServer.cs
示例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)
{
}
开发者ID:tritao,项目名称:flood,代码行数:7,代码来源:ThreadPoolServer.cs
示例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)
{
}
开发者ID:vicaya,项目名称:thrift,代码行数:7,代码来源:TThreadedServer.cs
示例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());
}
}
开发者ID:hippo811028,项目名称:Dynamo,代码行数:25,代码来源:dynCommunication.cs
示例5: TServer
public TServer(TProcessor processor,
TServerTransport serverTransport,
LogDelegate logDelegate)
: this(
processor, serverTransport, new TTransportFactory(), new TTransportFactory(), new TBinaryProtocol.Factory(),
new TBinaryProtocol.Factory(), DefaultLogDelegate)
{
}
开发者ID:starckgates,项目名称:ElasticSearch.Net,代码行数:8,代码来源:TServer.cs
示例6: MultiConverterModel
public MultiConverterModel(Part part, Vessel vessel, LogDelegate logDelegate)
{
this.part = part;
this.vessel = vessel;
this.logDelegate = logDelegate;
this.converters = new List<ModuleResourceConverter>();
}
开发者ID:Bear67,项目名称:WildBlueTools,代码行数:8,代码来源:MultiConverterModel.cs
示例7: Logger
internal Logger(string name, ILogger logger, ConfigSource config)
{
this.name = name;
this.logger = logger;
this.config = config;
logDelegate = new LogDelegate(Log);
}
开发者ID:ikvm,项目名称:cloudb,代码行数:8,代码来源:Logger.cs
示例8: TSimpleServer
public TSimpleServer(TProcessor processor,
TServerTransport serverTransport,
LogDelegate logDel)
: base(
processor, serverTransport, new TTransportFactory(), new TTransportFactory(), new TBinaryProtocol.Factory(),
new TBinaryProtocol.Factory(), logDel)
{
}
开发者ID:starckgates,项目名称:ElasticSearch.Net,代码行数:8,代码来源:TSimpleServer.cs
示例9: FormServers
public FormServers()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
logDelegate=new LogDelegate(m_Log);
m_Globalize();
}
开发者ID:sonicwang1989,项目名称:lphant,代码行数:9,代码来源:FormServers.cs
示例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 );
}
}
开发者ID:fragmer,项目名称:fCraft,代码行数:9,代码来源:UI.cs
示例11: PacketSniffer
public PacketSniffer(LogDelegate logDelegate)
{
Log = logDelegate;
aborting = false;
device = null;
packetLock = new object();
packetAvailiable = new AutoResetEvent(false);
disposed = false;
}
开发者ID:devinvisible,项目名称:D2Smells2,代码行数:10,代码来源:PacketSniffer.cs
示例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;
}
开发者ID:crawfis,项目名称:RaceManager,代码行数:11,代码来源:LoggerSQL.cs
示例13: TServerAsync
public TServerAsync(TProcessorAsync processor,
TServerTransportAsync serverTransport,
LogDelegate logDelegate)
: this(processor,
serverTransport,
new TTransportFactoryAsync(),
new TTransportFactoryAsync(),
new TCompactProtocolAsync.Factory(),
new TCompactProtocolAsync.Factory(),
logDelegate)
{
}
开发者ID:skyuni,项目名称:thrift,代码行数:12,代码来源:TServerAsync.cs
示例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);
}
}
开发者ID:EricKilla,项目名称:MCForge-Vanilla,代码行数:12,代码来源:New_Window.cs
示例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);
}
}
开发者ID:eszanto8,项目名称:ForgeCraft,代码行数:13,代码来源:MainWindow.cs
示例16: CreateColumn
//!!logDelegate cannot block!
public static void CreateColumn(String header, LogDelegate logDelegate)
{
lock (loggingLock)
{
if (loggingStarted)
return;
headerList.Add(header);
delegateList.Add(logDelegate);
}
return;
}
开发者ID:Faham,项目名称:emophiz,代码行数:14,代码来源:Logger.cs
示例17: Main
public Main()
{
InitializeComponent();
LogDelegateInstance = new LogDelegate(_Log);
ErrorDelegateInstance = new ErrorDelegate(_Error);
StartServer sserver = new StartServer(_StartServer);
Thread serverConnection = new Thread(new ThreadStart(sserver));
serverConnection.Start();
//Thread.Sleep(5000);
}
开发者ID:carriercomm,项目名称:PolaMUD,代码行数:13,代码来源:Main.cs
示例18: SilentForm
public SilentForm()
: base()
{
InitializeComponent();
Alert = new AlertDelegate(AlertMethod);
Exit = new ExitDelegate(ExitMethod);
FatalExit = new FatalExitDelegate(FatalExitMethod);
Log = new LogDelegate(LogMethod);
ReportProgress = new ReportProgressDelegate(ReportProgressMethod);
Info = new InfoDelegate(InfoMethod);
logfile=File.OpenWrite(Path.GetDirectoryName(Application.ExecutablePath)+"\\cuetoogg.log.txt");
}
开发者ID:hansschmucker,项目名称:CueToOgg,代码行数:13,代码来源:SilentForm.cs
示例19: log
public void log(string msg)
{
if (this.InvokeRequired == false)
{
statusTextBox.Text += msg + Environment.NewLine;
}
else
{
LogDelegate logDelegate = new LogDelegate(log);
this.BeginInvoke(logDelegate,
new object[] { msg });
}
logInfo(msg);
}
开发者ID:jimbrannon,项目名称:tlap_p2jm,代码行数:14,代码来源:RunDialog.cs
示例20: TThreadPoolServer
public TThreadPoolServer(TProcessor processor,
TServerTransport serverTransport,
TTransportFactory inputTransportFactory,
TTransportFactory outputTransportFactory,
TProtocolFactory inputProtocolFactory,
TProtocolFactory outputProtocolFactory,
int minThreadPoolThreads, int maxThreadPoolThreads, LogDelegate logDel)
: base(processor, serverTransport, inputTransportFactory, outputTransportFactory,
inputProtocolFactory, outputProtocolFactory, logDel)
{
if (!ThreadPool.SetMaxThreads(maxThreadPoolThreads, maxThreadPoolThreads))
{
throw new Exception("Error: could not SetMaxThreads in ThreadPool");
}
}
开发者ID:trayburn,项目名称:EverGTD,代码行数:15,代码来源:TThreadPoolServer.cs
注:本文中的LogDelegate类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论