/// <summary> /// 初始化属于指定服务角色的系统工作者 /// </summary> /// <param name="role">服务角色</param> /// <param name="setting">远程配置设置</param> /// <param name="configurationProxy">远程配置站访问代理器</param> /// <param name="notificationHandler">异常通知处理器</param> /// <param name="proxy">KAE资源代理器</param> /// <exception cref="ArgumentNullException">参数不能为空</exception> public static void Initialize(string role, RemoteConfigurationSetting setting, IRemoteConfigurationProxy configurationProxy, ITracingNotificationHandler notificationHandler = null, IKAEResourceProxy proxy = null) { if (IsInitialized) { return; } if (setting == null) { setting = RemoteConfigurationSetting.Default; } if (proxy == null) { proxy = new KAEHostResourceProxy(); } if (string.IsNullOrEmpty(role)) { throw new ArgumentNullException(nameof(role)); } if (configurationProxy == null) { throw new ArgumentNullException(nameof(configurationProxy)); } SystemConfigurations.Initialize(role, setting, configurationProxy); _tracing = TracingManager.GetTracing(typeof(SystemWorker));; TransactionGlobal.Initialize(); _configurationProxy = configurationProxy; _hostProxy = proxy; TracingManager.NotificationHandler = notificationHandler ?? new RemoteLogProxy(); InitializeCore(role); //initialize long...long memory buffer for tcp layer. ChannelConst.Initialize(); _isInitialized = true; IsInSpecifiedKPP = false; }
public RpcServerObserverItem(string service, string method, string fromService, string fromComputer) { Service = service; Method = method; FromService = fromService; FromComputer = fromComputer; RequestTracer = TracingManager.GetTracing(string.Format("RpcServer.{0}.{1}.Request", service, method)); ResponseTracer = TracingManager.GetTracing(string.Format("RpcServer.{0}.{1}.Response", service, method)); }
public RpcClientObserverItem(string serverUri, string service, string method, string serviceRole) { ServerUri = serverUri; Service = service; Method = method; ServiceRole = serviceRole; RequestTracer = TracingManager.GetTracing(string.Format("RpcClient.{0}.{1}.Request", service, method)); ResponseTracer = TracingManager.GetTracing(string.Format("RpcClient.{0}.{1}.Response", service, method)); }
public TccCoordinator(string transName) { _transName = transName; _activeTrans = new Dictionary <string, TccTransaction <TContext> >(); _tracing = TracingManager.GetTracing("TccTransaction." + _transName); _counter = IICPerformanceCounterFactory.GetCounters <TccTransactionPerfCounter>(transName); _monitorThread = new Thread(MonitorProc); _monitorThread.IsBackground = false; _monitorThread.Name = "TccCoordinator.MonitorProc<" + _transName + ">"; }
static void Main(string[] args) { ServiceSettings.InitService("IICCommon"); ITracing tracing = TracingManager.GetTracing(typeof(Program)); tracing.Info("test"); LinkedNode <string> linkedNode = new LinkedNode <string>(); linkedNode.Value = "1"; linkedNode.AddNext("2"); linkedNode.AddNext("3"); foreach (string str in linkedNode.GetValues()) { Console.WriteLine(str); } Console.ReadLine(); }
/// <summary> /// 为KPP专门设计的初始化SystemWorker的函数 /// </summary> /// <param name="role">服务角色</param> /// <param name="proxy">KAE资源代理器</param> /// <param name="settings">KJFramework网络层设置集</param> /// <param name="appUniqueId">APP唯一编号</param> /// <exception cref="ArgumentNullException">参数不能为空</exception> internal static void InitializeForKPP(string role, IKAEResourceProxy proxy, ChannelInternalConfigSettings settings, Guid appUniqueId) { if (IsInitialized) { return; } if (string.IsNullOrEmpty(role)) { throw new ArgumentNullException(nameof(role)); } _hostProxy = proxy; _appUniqueId = appUniqueId; _configurationProxy = new KPPConfigurationProxy(proxy); SystemConfigurations.Initialize(role, RemoteConfigurationSetting.Default, _configurationProxy); _tracing = TracingManager.GetTracing(typeof(SystemWorker));; TransactionGlobal.Initialize(); //Regist("LGS", new LGSProtocolStack()); TracingManager.NotificationHandler = new RemoteLogProxy(); InitializeCore(role); //initialize long...long memory buffer for tcp layer. ChannelConst.Initialize(settings); _isInitialized = true; IsInSpecifiedKPP = true; }