private string[] GetMessage(NetworkStream stream) { byte[] numArray = new byte[4096]; int num = stream.Read(numArray, 0, 4096); ASCIIEncoding aSCIIEncoding = new ASCIIEncoding(); char[] chrArray = new char[1]; string str = aSCIIEncoding.GetString(numArray, 0, num).Trim(chrArray); Trace.Write(new TraceInfo(BridgeTraceErrorType.CommunicationWorkflow, null, string.Concat(" --> ", str))); string[] array = HandlerHost.GetSplit(str, '|').ToArray <string>(); return(array); }
public static void InitializeHosts(bool isBackground = false) { foreach (HostElement host in Bridge.Configuration.Hosts) { HandlerHost handlerHost = new HandlerHost(host.Name, host.IPAddress, host.Port, isBackground); handlerHost.Run(); } //try //{ // Uri[] uri = new Uri[] { new Uri(Bridge.Configuration.WcfBaseAddress) }; // WebServiceHost webServiceHost = new WebServiceHost(typeof(TradePlatformDataService), uri); // webServiceHost.Open(); // Trace.Write(new TraceInfo(BridgeTraceErrorType.HostInfo, null, string.Concat("TradePlatform Data Service is serving at ", Bridge.Configuration.WcfBaseAddress, "\n"))); //} //catch (Exception exception1) //{ // Exception exception = exception1; // Trace.Write(new TraceInfo(BridgeTraceErrorType.Execption, exception, "")); //} }