Permalink
Browse files

Added .editorconfig to generated projects and big.sln

Updated templates so generated project code fully matches the defined
config
Issue #103
  • Loading branch information...
mrlacey committed Apr 15, 2017
1 parent 474d7e5 commit 190ce6d94deddc33743553ead65eba417f540776
Showing with 233 additions and 185 deletions.
  1. +2 −2 .editorconfig
  2. +5 −0 code/Big.sln
  3. +1 −0 templates/ConsumerFeatures/HubNotifications/Services/ActivationService_postaction.cs
  4. +2 −2 templates/ConsumerFeatures/HubNotifications/Services/HubNotificationsFeatureService.cs
  5. +2 −0 templates/ConsumerFeatures/LiveTile/Services/ActivationService_postaction.cs
  6. +1 −1 templates/ConsumerFeatures/LiveTile/Services/LiveTileService.Samples.cs
  7. +2 −2 templates/ConsumerFeatures/LiveTile/Services/LiveTileService.cs
  8. +1 −1 templates/ConsumerFeatures/ToastNotifications/Services/ToastNotificationsFeatureService.Samples.cs
  9. +1 −1 templates/DevFeatures/BackgroundTask/BackgroundTasks/BackgroundTask.cs
  10. +1 −0 templates/DevFeatures/BackgroundTask/BackgroundTasks/BackgroundTaskFeature.cs
  11. +1 −1 templates/DevFeatures/BackgroundTask/Helpers/TaskExtensions.cs
  12. +2 −2 templates/DevFeatures/BackgroundTask/Services/BackgroundTaskService.cs
  13. +17 −17 templates/DevFeatures/SettingsStorage/Helpers/Json.cs
  14. +1 −1 templates/DevFeatures/SuspendAndResume/Services/OnBackgroundEnteringEventArgs.cs
  15. +1 −1 templates/DevFeatures/SuspendAndResume/Services/SuspendAndResumeService.cs
  16. +1 −1 templates/Pages/Blank.CodeBehind/Views/BlankViewPage.xaml
  17. +1 −1 templates/Pages/Blank/ViewModels/BlankViewViewModel.cs
  18. +1 −1 templates/Pages/Blank/Views/BlankViewPage.xaml
  19. +1 −1 templates/Pages/Map.CodeBehind/Services/LocationService.cs
  20. +1 −1 templates/Pages/Map.CodeBehind/Views/MapPagePage.xaml
  21. +2 −2 templates/Pages/Map.CodeBehind/Views/MapPagePage.xaml.cs
  22. +1 −1 templates/Pages/Map/Services/LocationService.cs
  23. +1 −1 templates/Pages/Map/ViewModels/MapPageViewModel.cs
  24. +2 −2 templates/Pages/Map/Views/MapPagePage.xaml
  25. +1 −1 templates/Pages/Map/Views/MapPagePage.xaml.cs
  26. +1 −1 templates/Pages/MasterDetail.CodeBehind/Views/MasterDetailDetailControl.xaml
  27. +1 −0 templates/Pages/MasterDetail.CodeBehind/Views/MasterDetailDetailControl.xaml.cs
  28. +1 −2 templates/Pages/MasterDetail.CodeBehind/Views/MasterDetailDetailPage.xaml
  29. +1 −1 templates/Pages/MasterDetail.CodeBehind/Views/MasterDetailDetailPage.xaml.cs
  30. +3 −3 templates/Pages/MasterDetail.CodeBehind/Views/MasterDetailPage.xaml
  31. +5 −6 templates/Pages/MasterDetail.CodeBehind/Views/MasterDetailPage.xaml.cs
  32. +1 −1 templates/Pages/MasterDetail/ViewModels/MasterDetailDetailViewModel.cs
  33. +3 −3 templates/Pages/MasterDetail/ViewModels/MasterDetailViewModel.cs
  34. +1 −1 templates/Pages/MasterDetail/Views/MasterDetailDetailControl.xaml
  35. +1 −0 templates/Pages/MasterDetail/Views/MasterDetailDetailControl.xaml.cs
  36. +1 −2 templates/Pages/MasterDetail/Views/MasterDetailDetailPage.xaml
  37. +4 −4 templates/Pages/MasterDetail/Views/MasterDetailPage.xaml
  38. +1 −1 templates/Pages/Settings.CodeBehind/Services/ActivationService_postaction.cs
  39. +2 −2 templates/Pages/Settings.CodeBehind/Services/ThemeSelectorService.cs
  40. +3 −3 templates/Pages/Settings.CodeBehind/Views/SettingsPagePage.xaml
  41. +1 −1 templates/Pages/Settings.CodeBehind/Views/SettingsPagePage.xaml.cs
  42. +1 −1 templates/Pages/Settings/Services/ActivationService_postaction.cs
  43. +2 −2 templates/Pages/Settings/Services/ThemeSelectorService.cs
  44. +1 −1 templates/Pages/Settings/ViewModels/SettingsPageViewModel.cs
  45. +5 −5 templates/Pages/Settings/Views/SettingsPagePage.xaml
  46. +1 −1 templates/Pages/Settings/Views/SettingsPagePage.xaml.cs
  47. +2 −2 templates/Pages/TabbedPivot.CodeBehind/Views/TabbedPivotPagePage.xaml
  48. +2 −2 templates/Pages/TabbedPivot/ViewModels/TabbedPivotPageViewModel.cs
  49. +1 −1 templates/Pages/TabbedPivot/Views/TabbedPivotPagePage.xaml
  50. +1 −1 templates/Pages/WebView.CodeBehind/Views/WebViewPagePage.xaml
  51. +1 −1 templates/Pages/WebView/ViewModels/WebViewPageViewModel.cs
  52. +1 −1 templates/Pages/WebView/Views/WebViewPagePage.xaml
  53. +11 −0 templates/Projects/Blank/.editorconfig
  54. +1 −1 templates/Projects/Blank/App.xaml.cs
  55. +1 −1 templates/Projects/Blank/Services/ActivationService.cs
  56. +3 −0 templates/Projects/Blank/uct.BlankProject.csproj
  57. +11 −0 templates/Projects/SplitView/.editorconfig
  58. +1 −1 templates/Projects/SplitView/App.xaml.cs
  59. +1 −1 templates/Projects/SplitView/Services/ActivationService.cs
  60. +3 −0 templates/Projects/SplitView/uct.SplitViewProject.csproj
  61. +11 −0 templates/Projects/TabbedPivot/.editorconfig
  62. +1 −1 templates/Projects/TabbedPivot/Services/ActivationService.cs
  63. +5 −2 templates/Projects/TabbedPivot/uct.TabbedPivotProject.csproj
  64. +1 −1 ...s/_composition/CodeBehind/Feature.SuspendAndResume/Services/SuspendAndResumeService_postaction.cs
  65. +1 −1 templates/_composition/CodeBehind/Page/Views/uct.ItemNamePage_postaction.xaml.cs
  66. +6 −6 templates/_composition/CodeBehind/Project.Blank.Page.Map/Views/uct.ItemNamePage_postaction.xaml.cs
  67. +2 −2 ..._composition/CodeBehind/Project.Blank.Page.MasterDetail/Views/uct.ItemNamePage_postaction.xaml.cs
  68. +3 −3 ...tes/_composition/CodeBehind/Project.Blank.Page.Settings/Views/uct.ItemNamePage_postaction.xaml.cs
  69. +6 −6 ...ates/_composition/CodeBehind/Project.SplitView.Page.Map/Views/uct.ItemNamePage_postaction.xaml.cs
  70. +2 −2 ...position/CodeBehind/Project.SplitView.Page.MasterDetail/Views/uct.ItemNamePage_postaction.xaml.cs
  71. +3 −3 ..._composition/CodeBehind/Project.SplitView.Page.Settings/Views/uct.ItemNamePage_postaction.xaml.cs
  72. +2 −2 templates/_composition/CodeBehind/Project.SplitView/Views/ShellPage.xaml.cs
  73. +3 −3 ...es/_composition/CodeBehind/Project.TabbedPivot.Page.Map/Views/uct.ItemNamePage_postaction.xaml.cs
  74. +2 −2 ...sition/CodeBehind/Project.TabbedPivot.Page.MasterDetail/Views/uct.ItemNamePage_postaction.xaml.cs
  75. +2 −2 ...omposition/CodeBehind/Project.TabbedPivot.Page.Settings/Views/uct.ItemNamePage_postaction.xaml.cs
  76. +1 −1 ...es/_composition/MVVMBasic/Feature.SuspendAndResume/Services/SuspendAndResumeService_postaction.cs
  77. +1 −1 templates/_composition/MVVMBasic/Page.MasterDetail/Views/uct.ItemNameDetailPage_postaction.xaml.cs
  78. +1 −1 templates/_composition/MVVMBasic/Page/Views/uct.ItemNamePage_postaction.xaml.cs
  79. +1 −1 templates/_composition/MVVMBasic/Project.Blank.Page.Map/Views/uct.ItemNamePage_postaction.xaml.cs
  80. +2 −2 .../_composition/MVVMBasic/Project.Blank.Page.MasterDetail/Views/uct.ItemNamePage_postaction.xaml.cs
  81. +3 −3 ...ates/_composition/MVVMBasic/Project.Blank.Page.Settings/Views/uct.ItemNamePage_postaction.xaml.cs
  82. +2 −2 ...lates/_composition/MVVMBasic/Project.SplitView.Page.Map/Views/uct.ItemNamePage_postaction.xaml.cs
  83. +2 −2 ...mposition/MVVMBasic/Project.SplitView.Page.MasterDetail/Views/uct.ItemNamePage_postaction.xaml.cs
  84. +3 −3 .../_composition/MVVMBasic/Project.SplitView.Page.Settings/Views/uct.ItemNamePage_postaction.xaml.cs
  85. +2 −2 templates/_composition/MVVMBasic/Project.SplitView/Models/ShellNavigationItem.cs
  86. +1 −3 templates/_composition/MVVMBasic/Project.SplitView/ViewModels/ShellViewModel.cs
  87. +2 −2 ...tes/_composition/MVVMBasic/Project.TabbedPivot.Page.Map/Views/uct.ItemNamePage_postaction.xaml.cs
  88. +2 −2 ...osition/MVVMBasic/Project.TabbedPivot.Page.MasterDetail/Views/uct.ItemNamePage_postaction.xaml.cs
  89. +2 −2 ...composition/MVVMBasic/Project.TabbedPivot.Page.Settings/Views/uct.ItemNamePage_postaction.xaml.cs
  90. +2 −2 templates/_composition/MVVMBasic/Project.TabbedPivot/ViewModels/PivotViewModel.cs
  91. +1 −1 templates/_composition/MVVMLight/Page.Settings/ViewModels/uct.ItemNameViewModel_postaction.cs
  92. +3 −3 templates/_composition/MVVMLight/Project.Blank.Page.Map/Views/uct.ItemNamePage_postaction.xaml.cs
  93. +2 −2 .../_composition/MVVMLight/Project.Blank.Page.MasterDetail/Views/uct.ItemNamePage_postaction.xaml.cs
  94. +3 −3 ...ates/_composition/MVVMLight/Project.Blank.Page.Settings/Views/uct.ItemNamePage_postaction.xaml.cs
  95. +3 −3 ...lates/_composition/MVVMLight/Project.SplitView.Page.Map/Views/uct.ItemNamePage_postaction.xaml.cs
  96. +2 −2 ...mposition/MVVMLight/Project.SplitView.Page.MasterDetail/Views/uct.ItemNamePage_postaction.xaml.cs
  97. +3 −3 .../_composition/MVVMLight/Project.SplitView.Page.Settings/Views/uct.ItemNamePage_postaction.xaml.cs
  98. +2 −2 ...tes/_composition/MVVMLight/Project.TabbedPivot.Page.Map/Views/uct.ItemNamePage_postaction.xaml.cs
  99. +2 −2 ...osition/MVVMLight/Project.TabbedPivot.Page.MasterDetail/Views/uct.ItemNamePage_postaction.xaml.cs
  100. +3 −3 ...composition/MVVMLight/Project.TabbedPivot.Page.Settings/Views/uct.ItemNamePage_postaction.xaml.cs
View
@@ -4,8 +4,8 @@ root = true
[*]
end_of_line = crlf
[*.cs]
[*.{cs,xaml}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
insert_final_newline = true
View
@@ -28,6 +28,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Installer.2017", "src\Insta
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp.UWP.VS2017.Solution", "src\ProjectTemplates\CSharp.UWP.2017.Solution\CSharp.UWP.VS2017.Solution.csproj", "{D5E1C23A-7547-412A-82F1-F00C34622C1E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{27462C12-6799-4289-A2E4-01B1491E8A73}"
ProjectSection(SolutionItems) = preProject
..\.editorconfig = ..\.editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -13,6 +13,7 @@ private async Task StartupAsync()
//Singleton<HubNotificationsService>.Instance.InitializeAsync();
}
private IEnumerable<ActivationHandler> GetActivationHandlers()
{
yield return Singleton<HubNotificationsService>.Instance;
@@ -13,7 +13,7 @@ internal class HubNotificationsFeatureService : ActivationHandler<ToastNotificat
public async void InitializeAsync()
{
// See more about adding push notifications to your Windows app
// Documentation: https://docs.microsoft.com/azure/app-service-mobile/app-service-mobile-windows-store-dotnet-get-started-push
// Documentation: https://docs.microsoft.com/azure/app-service-mobile/app-service-mobile-windows-store-dotnet-get-started-push
// Use your Hub Name here
var hubName = "";
@@ -42,4 +42,4 @@ protected override async Task HandleInternalAsync(ToastNotificationActivatedEven
await Task.CompletedTask;
}
}
}
}
@@ -9,10 +9,12 @@ private async Task InitializeAsync()
{
await Singleton<LiveTileService>.Instance.EnableQueueAsync();
}
private async Task StartupAsync()
{
Singleton<LiveTileService>.Instance.SampleUpdate();
}
private IEnumerable<ActivationHandler> GetActivationHandlers()
{
yield return Singleton<LiveTileService>.Instance;
@@ -95,4 +95,4 @@ public async Task SamplePinSecondary(string pageName)
await PinSecondaryTileAsync(tile);
}
}
}
}
@@ -54,7 +54,7 @@ protected override async Task HandleInternalAsync(LaunchActivatedEventArgs args)
await Task.CompletedTask;
}
protected override bool CanHandleInternal(LaunchActivatedEventArgs args)
protected override bool CanHandleInternal(LaunchActivatedEventArgs args)
{
return LaunchFromSecondaryTile(args) || LaunchFromLiveTileUpdate(args);
}
@@ -73,4 +73,4 @@ private bool LaunchFromLiveTileUpdate(LaunchActivatedEventArgs args)
return false;
}
}
}
}
@@ -6,7 +6,7 @@ namespace RootNamespace.Services
internal partial class ToastNotificationsFeatureService
{
public void ShowToastNotificationSample()
{
{
// Create the toast content
var content = new ToastContent()
{
@@ -29,4 +29,4 @@ public void SubscribeToEvents(IBackgroundTaskInstance taskInstance)
taskInstance.Canceled += new BackgroundTaskCanceledEventHandler(OnCanceled);
}
}
}
}
@@ -65,6 +65,7 @@ public override Task RunAsyncInternal(IBackgroundTaskInstance taskInstance)
ThreadPoolTimer.CreatePeriodicTimer(new TimerElapsedHandler(SampleTimerCallback), TimeSpan.FromSeconds(1));
});
}
public override void OnCanceled(IBackgroundTaskInstance sender, BackgroundTaskCancellationReason reason)
{
// TODO UWPTemplates: Insert code to handle the cancelation request here.
@@ -9,4 +9,4 @@ public static void FireAndForget(this Task task)
}
}
}
}
@@ -23,7 +23,7 @@ public void RegisterBackgroundTasks()
{
foreach (var task in BackgroundTasks)
{
task.Register();
task.Register();
}
}
@@ -64,4 +64,4 @@ private static IEnumerable<BackgroundTask> CreateInstances()
return backgroundTasks;
}
}
}
}
@@ -4,22 +4,22 @@
namespace RootNamespace.Helpers
{
public static class Json
{
public static async Task<T> ToObjectAsync<T>(string value)
{
return await Task.Run<T>(() =>
{
return JsonConvert.DeserializeObject<T>(value);
});
}
public static class Json
{
public static async Task<T> ToObjectAsync<T>(string value)
{
return await Task.Run<T>(() =>
{
return JsonConvert.DeserializeObject<T>(value);
});
}
public static async Task<string> StringifyAsync(object value)
{
return await Task.Run<string>(() =>
{
return JsonConvert.SerializeObject(value);
});
}
}
public static async Task<string> StringifyAsync(object value)
{
return await Task.Run<string>(() =>
{
return JsonConvert.SerializeObject(value);
});
}
}
}
@@ -13,4 +13,4 @@ public OnBackgroundEnteringEventArgs(SuspensionState suspensionState, Type targe
Target = target;
}
}
}
}
@@ -12,7 +12,7 @@ namespace ItemNamespace.Services
{
internal class SuspendAndResumeService : ActivationHandler<LaunchActivatedEventArgs>
{
// TODO UWPTEMPLATES: For more information regarding the application lifecycle and how to handle suspend and resume, please see:
// TODO UWPTEMPLATES: For more information regarding the application lifecycle and how to handle suspend and resume, please see:
// Documentation: https://docs.microsoft.com/windows/uwp/launch-resume/app-lifecycle
private const string stateFilename = "suspensionState";
@@ -28,4 +28,4 @@
Place your content here.-->
</Grid>
</Grid>
</Page>
</Page>
@@ -6,6 +6,6 @@ public class BlankViewViewModel : System.ComponentModel.INotifyPropertyChanged
{
public BlankViewViewModel()
{
}
}
}
}
@@ -27,4 +27,4 @@
Place your content here.-->
</Grid>
</Grid>
</Page>
</Page>
@@ -113,4 +113,4 @@ private async void GeolocatorOnPositionChanged(Geolocator sender, PositionChange
});
}
}
}
}
@@ -7,7 +7,7 @@
xmlns:maps="using:Windows.UI.Xaml.Controls.Maps"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<maps:MapControl
x:Name="mapControl"
ZoomLevel="{x:Bind ZoomLevel, Mode=OneWay}"
@@ -92,7 +92,7 @@ private void LocationServicePositionChanged(object sender, Geoposition geopositi
{
Center = geoposition.Coordinate.Point;
}
}
}
private void AddMapIcon(Geopoint position, string title)
{
@@ -105,6 +105,6 @@ private void AddMapIcon(Geopoint position, string title)
ZIndex = 0
};
mapControl.MapElements.Add(mapIcon);
}
}
}
}
@@ -113,4 +113,4 @@ private async void GeolocatorOnPositionChanged(Geolocator sender, PositionChange
});
}
}
}
}
@@ -97,4 +97,4 @@ private void AddMapIcon(MapControl map, Geopoint position, string title)
map.MapElements.Add(mapIcon);
}
}
}
}
@@ -7,11 +7,11 @@
xmlns:maps="using:Windows.UI.Xaml.Controls.Maps"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<maps:MapControl
x:Name="mapControl"
ZoomLevel="{x:Bind ViewModel.ZoomLevel, Mode=OneWay}"
Center="{x:Bind ViewModel.Center, Mode=OneWay}"/>
<TickBar/>
</Grid>
</Page>
</Page>
@@ -7,6 +7,6 @@ public sealed partial class MapPagePage : Page
public MapPagePage()
{
InitializeComponent();
}
}
}
}
@@ -18,7 +18,7 @@
Text="{x:Bind MasterMenuItem.Title, Mode=OneWay}"
FontSize="28" FontWeight="SemiLight" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" VerticalAlignment="Center"
Margin="0,0,12,7"/>
<ScrollViewer
Grid.Row="1"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
@@ -11,6 +11,7 @@ public SampleModel MasterMenuItem
get { return GetValue(MasterMenuItemProperty) as SampleModel; }
set { SetValue(MasterMenuItemProperty, value); }
}
public static DependencyProperty MasterMenuItemProperty = DependencyProperty.Register("MasterMenuItem",typeof(SampleModel),typeof(MasterDetailDetailControl),new PropertyMetadata(null));
public MasterDetailDetailControl()
@@ -7,8 +7,7 @@
xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
xmlns:i="using:Microsoft.Xaml.Interactivity"
xmlns:views="using:ItemNamespace.Views"
mc:Ignorable="d">
mc:Ignorable="d">
<Grid
x:Name="ContentArea"
@@ -26,7 +26,7 @@ public MasterDetailDetailPage()
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
{
Item = e.Parameter as SampleModel;
}
@@ -21,7 +21,7 @@
Text="{x:Bind Title}"
FontSize="16" FontWeight="SemiBold" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap"/>
<TextBlock
<TextBlock
Grid.Row="1"
Opacity="0.6"
Text="{x:Bind Description}"
@@ -33,7 +33,7 @@
<Grid
x:Name="ContentArea"
Padding="12,0,12,0">
<Grid.RowDefinitions>
<RowDefinition x:Name="TitleRow" Height="Auto"/>
<RowDefinition Height="*"/>
@@ -133,4 +133,4 @@
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</Page>
</Page>
@@ -20,7 +20,7 @@ public SampleModel Selected
public ICommand ItemClickCommand { get; private set; }
public ObservableCollection<SampleModel> SampleItems { get; private set; } = new ObservableCollection<SampleModel>();
public ObservableCollection<SampleModel> SampleItems { get; private set; } = new ObservableCollection<SampleModel>();
public MasterDetailPage()
{
@@ -34,19 +34,18 @@ private void Initialize()
}
private async Task LoadDataAsync()
{
{
SampleItems.Clear();
var service = new SampleModelService();
var data = await service.GetDataAsync();
foreach (var item in data)
{
{
SampleItems.Add(item);
}
}
Selected = SampleItems.First();
}
}
private void OnItemClick(ItemClickEventArgs args)
{
@@ -33,4 +33,4 @@ private void OnStateChanged(VisualStateChangedEventArgs args)
}
}
}
}
}
Oops, something went wrong.

0 comments on commit 190ce6d

Please sign in to comment.