Skip to content

Commit 5081f1d

Browse files
committed
chore: Adjust App.xaml.cs according to Serialization fix
1 parent 094924a commit 5081f1d

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/DevTKSS.Uno.Samples.MvuxGallery/App.xaml.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,11 @@ protected async override void OnLaunched(LaunchActivatedEventArgs args)
6666
.Section<AppConfig>()
6767

6868
.EmbeddedSource<App>("sampledata")
69-
.Section<CodeSampleOptionsConfiguration>()
70-
.Section<DashboardCodeSampleOptions>()
71-
.Section<MainCodeSampleOptions>()
72-
.Section<ListboardCodeSampleOptions>()
73-
.Section<SimpleCardsCodeSampleOptions>()
74-
.Section<CounterCodeSampleOptions>()
69+
.Section<DashboardSampleOptions>()
70+
.Section<MainSampleOptions>()
71+
.Section<ListboardSampleOptions>()
72+
.Section<SimpleCardsSampleOptions>()
73+
.Section<CounterSampleOptions>()
7574
)
7675
// Enable localization (see appsettings.json for supported languages)
7776
.UseLocalization()
@@ -81,26 +80,27 @@ protected async override void OnLaunched(LaunchActivatedEventArgs args)
8180

8281
.AddSingleton<IGalleryImageService, GalleryImageService>()
8382

84-
// .AddSingleton<ICodeSampleService<CodeSampleOptionsConfiguration>, CodeSampleService<CodeSampleOptionsConfiguration>>()
85-
86-
.AddSingleton<ICodeSampleService<MainCodeSampleOptions>, CodeSampleService<MainCodeSampleOptions>>()
87-
.AddSingleton<ICodeSampleService<ListboardCodeSampleOptions>,CodeSampleService<ListboardCodeSampleOptions>>()
88-
.AddSingleton<ICodeSampleService<SimpleCardsCodeSampleOptions>, CodeSampleService<SimpleCardsCodeSampleOptions>>()
89-
.AddSingleton<ICodeSampleService<CounterCodeSampleOptions>, CodeSampleService<CounterCodeSampleOptions>>()
90-
.AddSingleton<ICodeSampleService<DashboardCodeSampleOptions>, CodeSampleService<DashboardCodeSampleOptions>>()
83+
.AddSingleton<ICodeSampleService<MainSampleOptions>, CodeSampleService<MainSampleOptions>>()
84+
.AddSingleton<ICodeSampleService<ListboardSampleOptions>,CodeSampleService<ListboardSampleOptions>>()
85+
.AddSingleton<ICodeSampleService<SimpleCardsSampleOptions>, CodeSampleService<SimpleCardsSampleOptions>>()
86+
.AddSingleton<ICodeSampleService<CounterSampleOptions>, CodeSampleService<CounterSampleOptions>>()
87+
.AddSingleton<ICodeSampleService<DashboardSampleOptions>, CodeSampleService<DashboardSampleOptions>>()
9188
)
9289
.UseNavigation(ReactiveViewModelMappings.ViewModelMappings, RegisterRoutes)
9390
.UseSerialization((context, services) =>
9491
services
9592
.AddJsonTypeInfo(CodeSampleOptionContext.Default.CodeSampleOption)
96-
.AddJsonTypeInfo(CodeSampleOptionsConfigurationContext.Default.CodeSampleOptionsConfiguration)
93+
.AddJsonTypeInfo(CodeSampleOptionContext.Default.LinesArray)
94+
.AddJsonTypeInfo(CodeSampleOptionContext.Default.CodeSampleOptionsConfiguration)
95+
.AddJsonTypeInfo(CodeSampleOptionContext.Default.Int32)
96+
.AddJsonTypeInfo(CodeSampleOptionContext.Default.String)
9797

9898
// Following should get removed when NamedOptions can be used with DI Services and really getting values from the configuration
99-
.AddJsonTypeInfo(MainCodeSampleOptionsContext.Default.MainCodeSampleOptions)
100-
.AddJsonTypeInfo(ListboardCodeSampleOptionsContext.Default.ListboardCodeSampleOptions)
101-
.AddJsonTypeInfo(SimpleCardsCodeSampleOptionsContext.Default.SimpleCardsCodeSampleOptions)
102-
.AddJsonTypeInfo(CounterCodeSampleOptionsContext.Default.CounterCodeSampleOptions)
103-
.AddJsonTypeInfo(DashboardCodeSampleOptionsContext.Default.DashboardCodeSampleOptions)
99+
.AddJsonTypeInfo(CodeSampleOptionContext.Default.MainSampleOptions)
100+
.AddJsonTypeInfo(CodeSampleOptionContext.Default.ListboardSampleOptions)
101+
.AddJsonTypeInfo(CodeSampleOptionContext.Default.SimpleCardsSampleOptions)
102+
.AddJsonTypeInfo(CodeSampleOptionContext.Default.CounterSampleOptions)
103+
.AddJsonTypeInfo(CodeSampleOptionContext.Default.DashboardSampleOptions)
104104

105105
.AddSingleton(new JsonSerializerOptions { PropertyNameCaseInsensitive = true })
106106
)

0 commit comments

Comments
 (0)