本文整理汇总了C#中BMC.CoreLib.Diagnostics.ModuleProc类的典型用法代码示例。如果您正苦于以下问题:C# ModuleProc类的具体用法?C# ModuleProc怎么用?C# ModuleProc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModuleProc类属于BMC.CoreLib.Diagnostics命名空间,在下文中一共展示了ModuleProc类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: StopMonitoring
public void StopMonitoring()
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "StopMonitoring");
try
{
if (_fileMonitor != null)
{
lock (_lock)
{
if (_fileMonitor != null)
{
_fileMonitor.EnableRaisingEvents = false;
_fileMonitor.Changed -= (OnFileMonitor_Changed);
_fileMonitor.Dispose();
_fileMonitor = null;
}
}
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:25,代码来源:FileModificationWatcher.cs
示例2: Parse_configurationInfo_getDenomination
internal bool Parse_configurationInfo_getDenomination(s2sMessage target, DLDenominationCollectionDto collection)
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "Parse_configurationInfo_getDenomination");
bool result = default(bool);
try
{
configurationInfo ci = target.p_body.p_configuration.p_configurationInfo;
if (collection != null)
{
List<denomination> denominations = new List<denomination>();
foreach (var dto in collection)
{
denominations.Add(new denomination()
{
denominationId = dto.DenominationId,
denominationName = dto.DenominationName,
denominationValue = dto.DenominationValue,
denominationActive = dto.IsActive,
});
}
ci.denomination = denominations.ToArray();
result = true;
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
return result;
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:32,代码来源:config_denom.cs
示例3: AddDefaultServiceBehaviors
private void AddDefaultServiceBehaviors()
{
ModuleProc PROC = new ModuleProc("ExOneServiceHost", "AddDefaultServiceBehaviors");
try
{
// ServiceMetadataBehavior
_serviceMetadata = this.Description.Behaviors.Find<ServiceMetadataBehavior>();
if (_serviceMetadata == null)
{
_serviceMetadata = new ServiceMetadataBehavior();
this.Description.Behaviors.Add(_serviceMetadata);
}
_serviceMetadata.HttpGetEnabled = false;
//bServiceMetadata.HttpGetUrl = uriHttp;
// ServiceDebugBehavior
ServiceDebugBehavior bServiceDebug = this.Description.Behaviors.Find<ServiceDebugBehavior>();
if (bServiceDebug == null)
{
bServiceDebug = new ServiceDebugBehavior();
this.Description.Behaviors.Add(bServiceDebug);
}
bServiceDebug.IncludeExceptionDetailInFaults = false;
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:30,代码来源:WcfServiceHost.cs
示例4: UpdateMessageHistory
public bool UpdateMessageHistory(bool logMessage, int fromSystem, int toSystem, string siteCode, DateTime dateTime,
int refID, string request, string response)
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "UpdateMessageHistory");
bool result = default(bool);
if (!logMessage) return true;
try
{
using (Database db = DbFactory.OpenDB(_connectionString))
{
db.Open();
DbParameter[] parameters = db.CreateParameters(8);
parameters[0] = db.CreateParameter("@EBS_FromSystem", fromSystem);
parameters[1] = db.CreateParameter("@EBS_ToSystem", toSystem);
parameters[2] = db.CreateParameter("@EBS_SiteCode", DbType.AnsiString, 50, siteCode);
parameters[3] = db.CreateParameter("@EBS_DateTime", dateTime);
parameters[4] = db.CreateParameter("@EBS_RefID", refID);
parameters[5] = db.CreateParameter("@EBS_Request", request);
parameters[6] = db.CreateParameter("@EBS_Response", response);
parameters[7] = db.CreateRetValueParameter(DbType.Int32);
result = db.ExecuteNonQueryAndReturnIntOK("[dbo].[usp_EBS_InsertMessageHistory]", parameters);
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
return result;
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:33,代码来源:UnprocessedRecords.cs
示例5: GetMessage
internal static string GetMessage(int index)
{
ModuleProc PROC = new ModuleProc("", "GetMessage");
string result = default(string);
try
{
if (index > 0)
{
int newIndex = (index % _displayMessages.Length);
if (newIndex >= 0 && newIndex < _displayMessages.Length)
{
result = _displayMessages[newIndex];
}
}
if(result.IsEmpty())
{
result = _displayMessages[9];
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
return result;
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:28,代码来源:AsyncProgressHelpers.cs
示例6: Parse_configurationInfo_getGame
internal bool Parse_configurationInfo_getGame(s2sMessage target, DLGameCollectionDto collection)
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "Parse_configurationInfo_getGame");
bool result = default(bool);
try
{
configurationInfo ci = target.p_body.p_configuration.p_configurationInfo;
if (collection != null)
{
List<game> Games = new List<game>();
foreach (var dto in collection)
{
Games.Add(new game()
{
gameId = dto.GameID.ToStringSafe(),
gameName = dto.GameName,
gameActive = dto.IsActive,
});
}
ci.game = Games.ToArray();
result = true;
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
return result;
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:31,代码来源:config_game.cs
示例7: Save
public void Save(bool rollback)
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "SaveChanges");
try
{
if (_scope != null)
{
if (!rollback)
{
_scope.Complete();
}
else
{
Transaction.Current.Rollback();
}
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
finally
{
if (_scope != null)
{
_scope.Dispose();
}
}
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:30,代码来源:TransactionHelper.cs
示例8: MessageQueueWorkerInfo
public MessageQueueWorkerInfo(int messageThreshold, int queueThreshold, bool flushItemsBeforeClose, MessageQueueInfo[] queueInfos)
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, ".ctor");
try
{
this.MessageThreshold = messageThreshold;
this.QueueThreshold = queueThreshold;
this.FlushItemsBeforeClose = flushItemsBeforeClose;
if (queueInfos == null)
{
this.QueueInfos = new List<MessageQueueInfo>();
}
else
{
this.QueueInfos = new List<MessageQueueInfo>(queueInfos);
}
Log.InfoV(PROC, "Message Threshold : {0:D}", messageThreshold);
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:25,代码来源:MessageQueueManager.cs
示例9: Start
public void Start()
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "Start");
try
{
this.PopulateCache(true);
if (_fileMonitor == null)
{
lock (_lock)
{
if (_fileMonitor == null)
{
_fileMonitor = new FileSystemWatcher();
_fileMonitor.Path = Path.GetDirectoryName(_config.FilePath);
_fileMonitor.Filter = Path.GetFileName(_config.FilePath);
_fileMonitor.EnableRaisingEvents = true;
_fileMonitor.NotifyFilter = NotifyFilters.LastWrite;
_fileMonitor.Changed += new FileSystemEventHandler(OnFileMonitor_Changed);
}
}
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:29,代码来源:ConfigAppSettingWatcher.cs
示例10: OnLoadedCommandChanged
private static void OnLoadedCommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
ModuleProc PROC = new ModuleProc("FrameworkElementBehaviors", "OnLoadedCommandChanged");
try
{
FrameworkElement fe = d as FrameworkElement;
if (fe != null)
{
fe.Loaded += (s, a) =>
{
ICommand cmd = e.NewValue as ICommand;
if (cmd != null &&
cmd.CanExecute(fe))
{
cmd.Execute(fe);
}
};
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:25,代码来源:FrameworkElementBehaviors.cs
示例11: AppNotifyService_NotifyData
void AppNotifyService_NotifyData(object sender, AppNotifyDataEventArgs e)
{
ModuleProc PROC = new ModuleProc("AppNotifyService", "Subscribe");
try
{
if (((ICommunicationObject)_callback).State == CommunicationState.Opened)
{
try
{
_callback.NotifyData(e.Data);
}
catch
{
this.Unsubscribe();
}
}
else
{
this.Unsubscribe();
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
this.Unsubscribe();
}
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:28,代码来源:AppNotifyService.cs
示例12: Parse_configurationInfo_getManufacturer
internal bool Parse_configurationInfo_getManufacturer(s2sMessage target, DLManufacturerCollectionDto collection)
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "Parse_configurationInfo_getManufacturer");
bool result = default(bool);
try
{
configurationInfo ci = target.p_body.p_configuration.p_configurationInfo;
if (collection != null)
{
List<manufacturer> manufacturers = new List<manufacturer>();
foreach (var dto in collection)
{
manufacturers.Add(new manufacturer()
{
manufacturerId = dto.ManufacturerId.ToString(),
manufacturerName = dto.ManufacturerName,
manufacturerValue = dto.ManufacturerValue,
manufacturerActive = dto.IsActive,
});
}
ci.manufacturer = manufacturers.ToArray();
result = true;
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
return result;
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:32,代码来源:config_manufacturer.cs
示例13: AddImportedSchemas
private void AddImportedSchemas(XmlSchema schema, XmlSchemaSet schemaSet, List<XmlSchema> importsList)
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "AddImportedSchemas");
try
{
foreach (XmlSchemaImport import in schema.Includes)
{
ICollection realSchemas = schemaSet.Schemas(import.Namespace);
foreach (XmlSchema ixsd in realSchemas)
{
if (!importsList.Contains(ixsd))
{
importsList.Add(ixsd);
AddImportedSchemas(ixsd, schemaSet, importsList);
}
}
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:25,代码来源:WcfSingleWsdlExportEndpoint.cs
示例14: OnReceiveMessages
private void OnReceiveMessages()
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "OnReceiveMessages");
try
{
while (!this.ExecutorService.WaitForShutdown())
{
try
{
AppNotifyData data = _queue.Dequeue();
if (data != null && _callback != null)
{
_callback.NotifyData(data);
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
finally
{
this.Shutdown();
}
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:31,代码来源:AppNotifyServiceClientCallback.cs
示例15: ProcessMessaage
public Message ProcessMessaage(Message request)
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "ProcessMessage");
Message result = default(Message);
IRequestChannel channel = null;
try
{
channel = _factory.CreateChannel(this.TargetFinder.GetAddress(request));
channel.Open();
result = channel.Request(request);
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
finally
{
if (channel != null && channel.State == CommunicationState.Opened)
{
channel.Close();
}
}
return result;
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:26,代码来源:WcfRoutingService.cs
示例16: Add
public bool Add(string settingName, string settingValue)
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "AddIfNotExists");
bool result = false;
try
{
using (Database db = this.DataManager.Connect())
{
DbParameter[] parameters = db.CreateParametersV(
db.CreateParameter("@SettingName", settingName),
db.CreateParameter("@SettingValue", settingValue)
);
result = (db.ExecuteNonQuery(CommandType.Text, QUERY_INSERT_RECORD, parameters) > 0);
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
finally
{
if (result)
Log.InfoV(PROC, "Data with Hash code {0} was inserted into GIM Information ({1}).", settingName, (result ? "Success" : "Failure"));
}
return result;
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:28,代码来源:FFTblSettings.cs
示例17: MessageQueueInfo
public MessageQueueInfo(string servicePath, bool isTransactional,
IMessageFormatter formatter, int queueTimeout,
KeyValuePair<string, IMessageFormatter>[] messageFormatters)
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, ".ctor");
try
{
this.ServicePath = servicePath;
this.IsTransactional = isTransactional;
this.Formatter = formatter;
this.QueueTimeout = queueTimeout;
if (messageFormatters != null)
{
this.MessageFormatters = new SortedDictionary<string, IMessageFormatter>(StringComparer.InvariantCultureIgnoreCase);
foreach (KeyValuePair<string, IMessageFormatter> messageFormatter in messageFormatters)
{
this.MessageFormatters.Add(messageFormatter);
}
}
Log.InfoV(PROC, "Service Path : {0}, Is Transactional : {1}", servicePath, isTransactional);
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:28,代码来源:MessageQueueManager.cs
示例18: Parse_configurationInfo_getSite
internal bool Parse_configurationInfo_getSite(s2sMessage target, DLSiteCollectionDto collection)
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "Parse_getConfiguration");
bool result = default(bool);
try
{
configurationInfo ci = target.p_body.p_configuration.p_configurationInfo;
if (collection != null)
{
List<casino> Casinos = new List<casino>();
foreach (var dto in collection)
{
Casinos.Add(new casino()
{
casinoId = dto.SiteId,
casinoName = dto.SiteName,
casinoActive = dto.IsActive
});
}
ci.casino = Casinos.ToArray();
result = true;
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
return result;
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:31,代码来源:config_site.cs
示例19: Start
private void Start(string baseAddress, string path)
{
ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "Start");
try
{
if (_host == null)
{
lock (_lock)
{
if (_host == null)
{
// Binding
NetTcpBinding binding = AppNotifyServiceHelper.CreateBinding();
// Host
Uri uriTcp = new Uri(new Uri(Uri.UriSchemeNetTcp + "://" + baseAddress), path);
//Uri uriHttp = new Uri(new Uri(Uri.UriSchemeHttp + "://" + baseAddress), path);
_host = new WcfServiceHost(typeof(AppNotifyService), _knownTypes, new Uri[] { uriTcp });
// ServiceMetadataBehavior
ServiceMetadataBehavior bServiceMetadata = _host.Description.Behaviors.Find<ServiceMetadataBehavior>();
if (bServiceMetadata == null)
{
bServiceMetadata = new ServiceMetadataBehavior();
_host.Description.Behaviors.Add(bServiceMetadata);
}
bServiceMetadata.HttpGetEnabled = false;
//bServiceMetadata.HttpGetUrl = uriHttp;
// ServiceDebugBehavior
ServiceDebugBehavior bServiceDebug = _host.Description.Behaviors.Find<ServiceDebugBehavior>();
if (bServiceDebug == null)
{
bServiceDebug = new ServiceDebugBehavior();
_host.Description.Behaviors.Add(bServiceDebug);
}
bServiceDebug.IncludeExceptionDetailInFaults = false;
// service points
_host.AddServiceEndpoint(typeof(IAppNotifyService), binding, string.Empty);
_host.AddServiceEndpoint(typeof(IMetadataExchange), MetadataExchangeBindings.CreateMexTcpBinding(), "mex");
}
}
}
if (_host != null &&
_host.State == CommunicationState.Created)
{
_host.Open();
Log.InfoV(PROC, "Service started at : {0}", _host.BaseAddresses[0]);
_mreShutdown.Reset();
}
}
catch (Exception ex)
{
Log.Exception(PROC, ex);
}
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:59,代码来源:AppNotifyServiceFactory.cs
示例20: OnTransceiver_Receive
void OnTransceiver_Receive(UdpFreeformEntity item)
{
using (ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "ff_trans_Receive"))
{
Log.Info(PROC, "Processing G2H Message ...");
ExCommsExecutorFactory.ProcessMessage(item.EntityData as FFMsg_G2H);
}
}
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:8,代码来源:ExCommsServer_Transceiver.cs
注:本文中的BMC.CoreLib.Diagnostics.ModuleProc类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论