VicMoore 622 Posted Wednesday at 12:14 AM Share Posted Wednesday at 12:14 AM @LukeIn the VirtualTVExample code, saving the schedule with private ChannelSchedule GetSavedChannelSchedule(TunerHostInfo tuner, string tunerChannelId) within the C# PseudoTVTuner.cs code, returns both the schedule and a DirectoryNotFoundException. exception which causes the function to always return a null; private ChannelSchedule GetSavedChannelSchedule(TunerHostInfo tuner, string tunerChannelId) { var path = this.GetChannelDataPath(tuner.Id, tunerChannelId); try { return this.JsonSerializer.DeserializeFromFile<ChannelSchedule>(path); } catch (DirectoryNotFoundException) { } catch (FileNotFoundException) { } catch (Exception ex) { this.Logger.ErrorException("Error in GetSavedChannelSchedule for {0}", ex, path); } return null; } I think the problem is that the code is asynchronous and does not wait for the promise. Vic Link to comment Share on other sites More sharing options...
VicMoore 622 Posted Wednesday at 04:41 PM Author Share Posted Wednesday at 04:41 PM This function is now working OK. I am sure it was something stupid that I was doing. Vic 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now