Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

Commit 31ed906

Browse files
Merge pull request #77 from jamesmontemagno/feature-filename
Feature filename 3.0 Feature - net standard
2 parents 09d8cbc + 90a7a45 commit 31ed906

File tree

64 files changed

+9297
-1471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+9297
-1471
lines changed

.editorconfig

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Suppress: EC112
2+
# top-most EditorConfig file
3+
root = true
4+
5+
# Don't use tabs for indentation.
6+
[*]
7+
indent_style = tab
8+
# (Please don't specify an indent_size here; that has too many unintended consequences.)
9+
10+
# Code files
11+
[*.{cs,csx,vb,vbx}]
12+
indent_size = 4
13+
14+
# Xml project files
15+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
16+
indent_size = 2
17+
18+
# Xml config files
19+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
20+
indent_size = 2
21+
22+
# JSON files
23+
[*.json]
24+
indent_size = 2
25+
26+
# Dotnet code style settings:
27+
[*.{cs,vb}]
28+
# Sort using and Import directives with System.* appearing first
29+
dotnet_sort_system_directives_first = false
30+
# Avoid "this." and "Me." if not necessary
31+
dotnet_style_qualification_for_field = false:suggestion
32+
dotnet_style_qualification_for_property = false:suggestion
33+
dotnet_style_qualification_for_method = false:suggestion
34+
dotnet_style_qualification_for_event = false:suggestion
35+
36+
# Use language keywords instead of framework type names for type references
37+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
38+
dotnet_style_predefined_type_for_member_access = true:suggestion
39+
40+
# Suggest more modern language features when available
41+
dotnet_style_object_initializer = true:suggestion
42+
dotnet_style_collection_initializer = true:suggestion
43+
dotnet_style_coalesce_expression = true:suggestion
44+
dotnet_style_null_propagation = true:suggestion
45+
dotnet_style_explicit_tuple_names = true:suggestion
46+
47+
# Naming Conventions:
48+
# Pascal Casing
49+
dotnet_naming_symbols.method_and_property_symbols.applicable_kinds= method,property,enum
50+
dotnet_naming_symbols.method_and_property_symbols.applicable_accessibilities = *
51+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
52+
53+
dotnet_naming_rule.methods_and_properties_must_be_pascal_case.severity = warning
54+
dotnet_naming_rule.methods_and_properties_must_be_pascal_case.symbols = method_and_property_symbols
55+
dotnet_naming_rule.methods_and_properties_must_be_pascal_case.style = pascal_case_style
56+
57+
# Non-public members must be lower-case
58+
dotnet_naming_symbols.non_public_symbols.applicable_kinds = property,method,field,event,delegate
59+
dotnet_naming_symbols.non_public_symbols.applicable_accessibilities = private
60+
dotnet_naming_style.all_lower_case_style.capitalization = camel_case
61+
62+
dotnet_naming_rule.non_public_members_must_be_lower_case.severity = warning
63+
dotnet_naming_rule.non_public_members_must_be_lower_case.symbols = non_public_symbols
64+
dotnet_naming_rule.non_public_members_must_be_lower_case.style = all_lower_case_style
65+
66+
# CSharp code style settings:
67+
[*.cs]
68+
# Do not prefer "var" everywhere
69+
csharp_style_var_for_built_in_types = true:suggestion
70+
csharp_style_var_when_type_is_apparent = true:suggestion
71+
csharp_style_var_elsewhere = true:suggestion
72+
73+
# Prefer method-like constructs to have a block body
74+
csharp_style_expression_bodied_methods = true:suggestion
75+
csharp_style_expression_bodied_constructors = true:none
76+
csharp_style_expression_bodied_operators = true:none
77+
78+
# Prefer property-like constructs to have an expression-body
79+
csharp_style_expression_bodied_properties = true:suggestion
80+
csharp_style_expression_bodied_indexers = true:none
81+
csharp_style_expression_bodied_accessors = true:none
82+
83+
# Suggest more modern language features when available
84+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
85+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
86+
csharp_style_inlined_variable_declaration = true:suggestion
87+
csharp_style_throw_expression = true:suggestion
88+
csharp_style_conditional_delegate_call = true:suggestion
89+
90+
# Newline settings
91+
csharp_new_line_before_open_brace = all
92+
csharp_new_line_before_else = true
93+
csharp_new_line_before_catch = true
94+
csharp_new_line_before_finally = true
95+
csharp_new_line_before_members_in_object_initializers = true
96+
csharp_new_line_before_members_in_anonymous_types = true
97+

CHANGELOG.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
### 2.6.0
2-
* Added ability to specify file name
3-
* iOS: SuiteName
4-
* Android: SharedPreferences name
5-
* UWP/WinRT Container Name
1+
### 3.0.0
2+
* Strongly Type all Gets and Sets
3+
* Re-targeted to .NET Standard 1.0
4+
* - Drop support for Windows Phone 8 Silverlight/Windows Phone/Store RT 8.1
65

6+
* Added ability to specify file name
7+
* -iOS: SuiteName
8+
* -Android: SharedPreferences name
9+
* -UWP/WinRT Container Name
710

811
### 2.5.8
912
* Fixed possible null reference exception when type is not supported.
@@ -18,6 +21,7 @@
1821
### 2.1.0
1922
* Remove help file and add in readme.txt
2023
* .NET 4.5 Implementation for unit testing
24+
2125
### 2.0.0
2226
* Breaking changes:
2327
* -New namespace - Plugin.Settings

README.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,15 @@ Build Status: [![Build status](https://ci.appveyor.com/api/projects/status/24dn7
2020

2121
**Platform Support**
2222

23-
|Platform|Supported|Version|
24-
| ------------------- | :-----------: | :------------------: |
25-
|Xamarin.iOS|Yes|iOS 7+|
26-
|Xamarin.Android|Yes|API 10+|
27-
|Windows Phone Silverlight|Yes|8.0+|
28-
|Windows Phone RT|Yes|8.1+|
29-
|Windows Store RT|Yes|8.1+|
30-
|Windows 10 UWP|Yes|10+|
31-
|Xamarin.Mac|Yes|All|
32-
|.NET 4.5|Yes|All|
23+
|Platform|Version|
24+
| ------------------- | :-----------: |
25+
|Xamarin.iOS|iOS 7+|
26+
|Xamarin.Android|API 15+|
27+
|Windows 10 UWP|10+|
28+
|Xamarin.Mac|All|
29+
|Xamarin.tvOS|All|
30+
|Xamarin.watchOS|All|
31+
|.NET 4.5|All|
3332

3433

3534
#### Settings Pluggin or Xamarin.Forms App.Properties
@@ -79,14 +78,14 @@ Now it is time to setup your actual setting that can be accessed from **ANY** pr
7978
```csharp
8079
public static string UserName
8180
{
82-
get { return AppSettings.GetValueOrDefault<string>(UserNameKey, UserNameDefault); }
83-
set { AppSettings.AddOrUpdateValue<string>(UserNameKey, value); }
81+
get { return AppSettings.GetValueOrDefault(UserNameKey, UserNameDefault); }
82+
set { AppSettings.AddOrUpdateValue(UserNameKey, value); }
8483
}
8584

8685
public static int SomeInt
8786
{
88-
get { return AppSettings.GetValueOrDefault<int>(SomeIntKey, SomeIntDefault); }
89-
set { AppSettings.AddOrUpdateValue<int>(SomeIntKey, value); }
87+
get { return AppSettings.GetValueOrDefault(SomeIntKey, SomeIntDefault); }
88+
set { AppSettings.AddOrUpdateValue(SomeIntKey, value); }
9089
}
9190
```
9291

@@ -150,8 +149,8 @@ public static class Settings
150149

151150
public static int Count
152151
{
153-
get { return AppSettings.GetValueOrDefault<int>(CountKey, CountDefault); }
154-
set { AppSettings.AddOrUpdateValue<int>(CountKey, value); }
152+
get { return AppSettings.GetValueOrDefault(CountKey, CountDefault); }
153+
set { AppSettings.AddOrUpdateValue(CountKey, value); }
155154
}
156155
}
157156
```
@@ -298,11 +297,11 @@ public class Settings : BaseViewModel
298297
{
299298
get
300299
{
301-
return AppSettings.GetValueOrDefault<int>(CountKey, CountDefault);
300+
return AppSettings.GetValueOrDefault(CountKey, CountDefault);
302301
}
303302
set
304303
{
305-
if (AppSettings.AddOrUpdateValue<int>(CountKey, value))
304+
if (AppSettings.AddOrUpdateValue(CountKey, value))
306305
OnPropertyChanged();
307306
308307
}

appveyor.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
version: 2.5.10.{build}-beta
1+
version: 3.0.0.{build}-beta
2+
image: Visual Studio 2017
23
assembly_info:
34
patch: true
45
file: '**\AssemblyInfo.*'
56
assembly_version: '{version}'
67
assembly_file_version: '{version}'
78
assembly_informational_version: '{version}'
9+
install:
10+
- echo y | "C:\Program Files (x86)\Android\android-sdk\tools\android.bat" update sdk -u -a -t tools
11+
- echo y | "C:\Program Files (x86)\Android\android-sdk\tools\android.bat" update sdk -u -a -t platform-tools
12+
- echo y | "C:\Program Files (x86)\Android\android-sdk\tools\android.bat" update sdk -u -a -t build-tools-25.0.6
13+
- echo y | "C:\Program Files (x86)\Android\android-sdk\tools\android.bat" update sdk -u -a -t android-25
14+
- echo y | "C:\Program Files (x86)\Android\android-sdk\tools\android.bat" update sdk -u -a -t android-15
815
build_script:
916
- cmd: >-
10-
powershell .\install-android-sdk.ps1
11-
1217
powershell .\bootstrapper.ps1 -Target Default -Verbosity diagnostic
1318
artifacts:
1419
- path: ./Build/nuget/*.nupkg
1520
name: NuGet
16-
- path: ./component/*.xam
17-
name: Component

files/Settings.cs.pp

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,40 @@
44

55
namespace $rootnamespace$.Helpers
66
{
7-
/// <summary>
8-
/// This is the Settings static class that can be used in your Core solution or in any
9-
/// of your client applications. All settings are laid out the same exact way with getters
10-
/// and setters.
11-
/// </summary>
12-
public static class Settings
13-
{
14-
private static ISettings AppSettings
15-
{
16-
get
17-
{
18-
return CrossSettings.Current;
19-
}
20-
}
7+
/// <summary>
8+
/// This is the Settings static class that can be used in your Core solution or in any
9+
/// of your client applications. All settings are laid out the same exact way with getters
10+
/// and setters.
11+
/// </summary>
12+
public static class Settings
13+
{
14+
private static ISettings AppSettings
15+
{
16+
get
17+
{
18+
return CrossSettings.Current;
19+
}
20+
}
2121

22-
#region Setting Constants
22+
#region Setting Constants
2323

24-
private const string SettingsKey = "settings_key";
25-
private static readonly string SettingsDefault = string.Empty;
24+
private const string SettingsKey = "settings_key";
25+
private static readonly string SettingsDefault = string.Empty;
2626

27-
#endregion
27+
#endregion
2828

2929

30-
public static string GeneralSettings
31-
{
32-
get
33-
{
34-
return AppSettings.GetValueOrDefault<string>(SettingsKey, SettingsDefault);
35-
}
36-
set
37-
{
38-
AppSettings.AddOrUpdateValue<string>(SettingsKey, value);
39-
}
40-
}
30+
public static string GeneralSettings
31+
{
32+
get
33+
{
34+
return AppSettings.GetValueOrDefault(SettingsKey, SettingsDefault);
35+
}
36+
set
37+
{
38+
AppSettings.AddOrUpdateValue(SettingsKey, value);
39+
}
40+
}
4141

42-
}
42+
}
4343
}

files/SettingsPlatform.cs.pp

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,40 @@
55
66
namespace $rootnamespace$.Helpers
77
{
8-
/// <summary>
9-
/// This is the Settings static class that can be used in your Core solution or in any
10-
/// of your client applications. All settings are laid out the same exact way with getters
11-
/// and setters.
12-
/// </summary>
13-
public static class Settings
14-
{
15-
private static ISettings AppSettings
16-
{
17-
get
18-
{
19-
return CrossSettings.Current;
20-
}
21-
}
8+
/// <summary>
9+
/// This is the Settings static class that can be used in your Core solution or in any
10+
/// of your client applications. All settings are laid out the same exact way with getters
11+
/// and setters.
12+
/// </summary>
13+
public static class Settings
14+
{
15+
private static ISettings AppSettings
16+
{
17+
get
18+
{
19+
return CrossSettings.Current;
20+
}
21+
}
2222
23-
#region Setting Constants
23+
#region Setting Constants
2424
25-
private const string SettingsKey = "settings_key";
26-
private static readonly string SettingsDefault = string.Empty;
25+
private const string SettingsKey = "settings_key";
26+
private static readonly string SettingsDefault = string.Empty;
2727
28-
#endregion
28+
#endregion
2929
3030
31-
public static string GeneralSettings
32-
{
33-
get
34-
{
35-
return AppSettings.GetValueOrDefault<string>(SettingsKey, SettingsDefault);
36-
}
37-
set
38-
{
39-
AppSettings.AddOrUpdateValue<string>(SettingsKey, value);
40-
}
41-
}
31+
public static string GeneralSettings
32+
{
33+
get
34+
{
35+
return AppSettings.GetValueOrDefault(SettingsKey, SettingsDefault);
36+
}
37+
set
38+
{
39+
AppSettings.AddOrUpdateValue(SettingsKey, value);
40+
}
41+
}
4242
43-
}
43+
}
4444
}*/

0 commit comments

Comments
 (0)