protected override void RestoreState(IApplicationStateService applicationStateService) { base.RestoreState(applicationStateService); if (applicationStateService.HasValueFor(nameof(this.StartDate), ApplicationState.Temp)) this.StartDate = applicationStateService.Get<DateTimeOffset>(nameof(this.StartDate), ApplicationState.Temp); if (applicationStateService.HasValueFor(nameof(this.EndDate), ApplicationState.Temp)) this.EndDate = applicationStateService.Get<DateTimeOffset>(nameof(this.EndDate), ApplicationState.Temp); }
protected override void RestoreState(IApplicationStateService applicationStateService) { base.RestoreState(applicationStateService); int thingy = applicationStateService.Get <int>("Thingy", ApplicationState.Local); }
public static string GetWebServiceAddress(this IApplicationStateService self) { return(self.Get <string>("WebServiceAddress", AState.Roaming)); }
public static string GetPassword(this IApplicationStateService self) { return(self.Get <string>("Password", AState.Vault)); }
public static string GetUsername(this IApplicationStateService self) { return(self.Get <string>("Username", AState.Roaming)); }
protected override void RestoreState(IApplicationStateService applicationStateService) { base.RestoreState(applicationStateService); var startDate = applicationStateService.Get<DateTimeOffset?>(nameof(this.StartDate), ApplicationState.Temp); if (startDate != null) this.StartDate = startDate.Value; var endDate = applicationStateService.Get<DateTimeOffset?>(nameof(this.EndDate), ApplicationState.Temp); if (endDate != null) { this.EndDate = endDate.Value; } }