public EnvironmentData GetEnvironmentData() { string machineName = Environment.MachineName; string domainName = Environment.UserDomainName.ToString(); string userName = Environment.UserName; string osVersion = Environment.OSVersion.ToString(); DateTime logTime = DateTime.Now; EnvironmentData temp = new EnvironmentData(machineName, domainName, userName, osVersion, logTime); return temp; }
public void SerializeAndStore(EnvironmentData environment) { string json = JsonConvert.SerializeObject(environment); System.IO.File.WriteAllText(@"C:\Users\Public\JSONEnvironment.txt", json); }
public MasterEntity(EnvironmentData environment, IISStringContainer iis, List<ServiceData> services) { this.environment = environment; this.iis = iis; this.services = services; }
public MasterEntity(EnvironmentData environment, IISStringContainer iis, List <ServiceData> services) { this.environment = environment; this.iis = iis; this.services = services; }
private DataExtract Setup() { envData = new EnvironmentData(null, null, null, null, DateTime.Now); eHandlerMoq = new Mock<IEnvironmentHandler>(); eHandlerMoq.Setup(m => m.GetEnvironmentData()).Returns(envData); iisHandlerMoq = new Mock<IIisHandler>(); servHandlerMoq = new Mock<IServiceHandler>(); var sut = new DataExtract(eHandlerMoq.Object, iisHandlerMoq.Object, servHandlerMoq.Object); return sut; }