Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Automated dotnet-format update (#229)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
  • Loading branch information
github-actions[bot] and jfversluis authored Aug 25, 2020
1 parent a03c21e commit 7d97d51
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 31 deletions.
30 changes: 15 additions & 15 deletions XamarinCommunityToolkit/Extensions/TranslateExtension.shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@

namespace Xamarin.CommunityToolkit.Extensions
{
[ContentProperty(nameof(Text))]
public class TranslateExtension : IMarkupExtension<BindingBase>
{
public string Text { get; set; }
public string StringFormat { get; set; }
object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider) => ProvideValue(serviceProvider);
[ContentProperty(nameof(Text))]
public class TranslateExtension : IMarkupExtension<BindingBase>
{
public string Text { get; set; }
public string StringFormat { get; set; }
object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider) => ProvideValue(serviceProvider);

public BindingBase ProvideValue(IServiceProvider serviceProvider)
{
#if !NETSTANDARD1_0
public BindingBase ProvideValue(IServiceProvider serviceProvider)
{
#if !NETSTANDARD1_0
var binding = new Binding
{
Mode = BindingMode.OneWay,
Expand All @@ -23,9 +23,9 @@ public BindingBase ProvideValue(IServiceProvider serviceProvider)
StringFormat = StringFormat
};
return binding;
#else
throw new NotSupportedException();
#endif
}
}
}
#else
throw new NotSupportedException();
#endif
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ public void Invalidate()
}
}
#endif
}
}
23 changes: 11 additions & 12 deletions XamarinCommunityToolkitSample/Models/Language.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
namespace Xamarin.CommunityToolkit.Sample.Models
{
public readonly struct Language
{
public Language(string name, string ci)
{
Name = name;
CI = ci;
}
public string Name { get; }
public string CI { get; }
}
}

public readonly struct Language
{
public Language(string name, string ci)
{
Name = name;
CI = ci;
}
public string Name { get; }
public string CI { get; }
}
}
2 changes: 1 addition & 1 deletion XamarinCommunityToolkitSample/Pages/SettingPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ public SettingPage()
async void OnCloseClicked(object sender, EventArgs e)
=> await Navigation.PopModalAsync();
}
}
}
4 changes: 2 additions & 2 deletions XamarinCommunityToolkitSample/ViewModels/SettingViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ void LoadLanguages()
};
SelectedLanguage = SupportedLanguages.FirstOrDefault(pro => pro.CI == LocalizationResourceManager.Current.CurrentCulture.TwoLetterISOLanguageName);
}
}
}
}
}

0 comments on commit 7d97d51

Please sign in to comment.