static void Main(string[] args) { ObjectMother.Current.GetName(); var actorId = new Microsoft.ServiceFabric.Actors.ActorId("xxx"); IConsoleRunnerLogger logger = new ConsoleRunnerLogger(Process.GetCurrentProcess().Id, Environment.MachineName, actorId); var consoleRunner = new ConsoleRunner(logger) { Process = Process.GetCurrentProcess(), Name = ObjectMother.Current.GetName() }; consoleRunner.Run(); }
public void WaitingForKeyPress( int processId, string machineName, Microsoft.ServiceFabric.Actors.ActorId actorId) { if (this.IsEnabled()) { WaitingForKeyPress( processId, Environment.MachineName, actorId.ToString()); } }
public void RunnerDestroyed( int processId, string machineName, Microsoft.ServiceFabric.Actors.ActorId actorId) { if (this.IsEnabled()) { RunnerDestroyed( processId, Environment.MachineName, actorId.ToString()); } }
public void StartLoop( int processId, string machineName, Microsoft.ServiceFabric.Actors.ActorId actorId) { if (this.IsEnabled()) { StartLoop( processId, Environment.MachineName, actorId.ToString()); } }
public ConsoleRunnerLogger( int processId, string machineName, Microsoft.ServiceFabric.Actors.ActorId actorId) { _processId = processId; _machineName = machineName; _actorId = actorId; _telemetryClient = new Microsoft.ApplicationInsights.TelemetryClient(); _telemetryClient.Context.User.Id = Environment.UserName; _telemetryClient.Context.Session.Id = Guid.NewGuid().ToString(); _telemetryClient.Context.Device.OperatingSystem = Environment.OSVersion.ToString(); }
public void StopHello( Microsoft.ServiceFabric.Actors.ActorId actorId, int processId, string machineName) { if (this.IsEnabled()) { StopHello( actorId.ToString(), actorId.Kind.ToString(), processId, Environment.MachineName); } }
public void RandomIntsGenerated( int processId, string machineName, Microsoft.ServiceFabric.Actors.ActorId actorId, int[] values) { if (this.IsEnabled()) { RandomIntsGenerated( processId, Environment.MachineName, actorId.ToString(), values.ToString()); } }
public void KeyPressed( int processId, string machineName, Microsoft.ServiceFabric.Actors.ActorId actorId, System.ConsoleKey key) { if (this.IsEnabled()) { KeyPressed( processId, Environment.MachineName, actorId.ToString(), key.ToString()); } }
public void Specially( Microsoft.ServiceFabric.Actors.ActorId actorId, int processId, string machineName, ConsoleApplication1.Loggers.Special special) { if (this.IsEnabled()) { Specially( actorId.ToString(), actorId.Kind.ToString(), processId, Environment.MachineName, special.ToString()); } }
public void UnsupportedKeyError( int processId, string machineName, Microsoft.ServiceFabric.Actors.ActorId actorId, System.Exception ex) { if (this.IsEnabled()) { UnsupportedKeyError( processId, Environment.MachineName, actorId.ToString(), ex.Message, ex.Source, ex.GetType().FullName, ex.AsJson()); } }
public void SayGoodbye( Microsoft.ServiceFabric.Actors.ActorId actorId, int processId, string machineName, string goodbye, System.DateTime nightTime) { if (this.IsEnabled()) { SayGoodbye( actorId.ToString(), actorId.Kind.ToString(), processId, Environment.MachineName, goodbye, nightTime.ToString()); } }
public void Error( Microsoft.ServiceFabric.Actors.ActorId actorId, int processId, string machineName, System.Exception exception) { if (this.IsEnabled()) { Error( actorId.ToString(), actorId.Kind.ToString(), processId, Environment.MachineName, exception.Message, exception.Source, exception.GetType().FullName, exception.AsJson()); } }