BuildIt.MvvmCross.UI.Views.BaseStateEnabledPage.LoadStateBundle C# (CSharp) Method

LoadStateBundle() protected method

protected LoadStateBundle ( NavigationEventArgs navigationEventArgs ) : IMvxBundle
navigationEventArgs NavigationEventArgs
return IMvxBundle
        protected override IMvxBundle LoadStateBundle(NavigationEventArgs navigationEventArgs)
        {
            try
            {
                var bundle = base.LoadStateBundle(navigationEventArgs);
                if (bundle == null)
                {
                    bundle = new MvxBundle();
                }
                foreach (var data in State)
                {
                    bundle.Data[data.Key] = data.Value.ToString();
                }
                return bundle;
            }
            catch (Exception exception)
            {
                Debug.WriteLine(exception.Message);
                return null;
            }
        }
#endif