/// <summary> /// Create the properties for the StateReport /// </summary> /// <param name="token"></param> /// <param name="device"></param> /// <returns></returns> public override async Task <List <Property> > CreateProperties(string token, DeviceDto device, string port) { LambdaLogger.Log("Power StateReport"); List <Property> properties = new List <Property>(); FieldValueDto value = await GetFieldValue(token, device, "powertState", port); if (value != null) { string stringValue = GetOnOff(value); var temperatureProperty = new StringValueProperty { Namespace = "Alexa.PowerController", Name = "powerState", Value = stringValue, TimeOfSample = DateTime.UtcNow, UncertaintyInMilliseconds = 600 }; properties.Add(temperatureProperty); } return(properties); }
internal RollingFileAppender(IElementConfiguration configuration) : base(configuration) { mDatePattern = new DatePattern(); mMaximumFileSize = new MaximumFileSize(); mCountDirection = new CountDirection(); mDateTimeStrategy = new StringValueProperty("Date Time Strategy:", "dateTimeStrategy", Log4NetXmlConstants.Type) { ToolTip = "Sets the strategy for determining the current date and time.\n" + "The default implementation is to use LocalDateTime (log4net.Appender.RollingFileAppender+LocalDateTime,log4net) which internally calls through to DateTime.Now.\n" + "DateTime.UtcNow may be used on frameworks newer than .NET 1.0 by specifying UniversalDateTime (log4net.Appender.RollingFileAppender+UniversalDateTime,log4net).\n" + "A custom implementation that implements IDateTime can be specified here as well. Leave blank to use LocalDateTime." }; }
set => this.SetValue(StringValueProperty, value);