Merge pull request #1 from xamarin/motz-add-base

Add base project and test
This commit is contained in:
Jonathan Dick 2018-02-20 16:38:59 -05:00 коммит произвёл GitHub
Родитель eb625092f2 058876cd7d
Коммит 96c9800778
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
13 изменённых файлов: 620 добавлений и 0 удалений

97
.editorconfig Normal file
Просмотреть файл

@ -0,0 +1,97 @@
# Suppress: EC112
# top-most EditorConfig file
root = true
# Don't use tabs for indentation.
[*]
indent_style = tab
# (Please don't specify an indent_size here; that has too many unintended consequences.)
# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2
# Xml config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
# JSON files
[*.json]
indent_size = 2
# Dotnet code style settings:
[*.{cs,vb}]
# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = false
# Avoid "this." and "Me." if not necessary
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
# Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
# Suggest more modern language features when available
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
# Naming Conventions:
# Pascal Casing
dotnet_naming_symbols.method_and_property_symbols.applicable_kinds= method,property,enum
dotnet_naming_symbols.method_and_property_symbols.applicable_accessibilities = *
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
dotnet_naming_rule.methods_and_properties_must_be_pascal_case.severity = warning
dotnet_naming_rule.methods_and_properties_must_be_pascal_case.symbols = method_and_property_symbols
dotnet_naming_rule.methods_and_properties_must_be_pascal_case.style = pascal_case_style
# Non-public members must be lower-case
dotnet_naming_symbols.non_public_symbols.applicable_kinds = property,method,field,event,delegate
dotnet_naming_symbols.non_public_symbols.applicable_accessibilities = private
dotnet_naming_style.all_lower_case_style.capitalization = camel_case
dotnet_naming_rule.non_public_members_must_be_lower_case.severity = warning
dotnet_naming_rule.non_public_members_must_be_lower_case.symbols = non_public_symbols
dotnet_naming_rule.non_public_members_must_be_lower_case.style = all_lower_case_style
# CSharp code style settings:
[*.cs]
# Do not prefer "var" everywhere
csharp_style_var_for_built_in_types = true:error
csharp_style_var_when_type_is_apparent = true:error
csharp_style_var_elsewhere = true:error
# Prefer method-like constructs to have a block body
csharp_style_expression_bodied_methods = true:suggestion
csharp_style_expression_bodied_constructors = true:suggestion
csharp_style_expression_bodied_operators = true:suggestion
# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_accessors = true:suggestion
# Suggest more modern language features when available
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
# Newline settings
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true

288
.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,288 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Typescript v1 declaration files
typings/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs

Просмотреть файл

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\F50\F50.csproj" />
</ItemGroup>
</Project>

14
F50.Tests/UnitTest1.cs Normal file
Просмотреть файл

@ -0,0 +1,14 @@
using System;
using Xunit;
namespace F50.Tests
{
public class UnitTest1
{
[Fact]
public void Test1()
{
}
}
}

41
F50.sln Normal file
Просмотреть файл

@ -0,0 +1,41 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2027
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "F50", "F50\F50.csproj", "{B5FE6C55-6B11-44AA-95A8-27E92F9F5A32}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{579F334C-FB7F-448A-A638-8FCB1CE53D93}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "F50.Tests", "F50.Tests\F50.Tests.csproj", "{445B6CA2-A1A3-4565-B7E8-D5AE6A5AF0CD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{A14D061F-382D-4609-A3B0-E1D0BF7AB6AC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B5FE6C55-6B11-44AA-95A8-27E92F9F5A32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B5FE6C55-6B11-44AA-95A8-27E92F9F5A32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B5FE6C55-6B11-44AA-95A8-27E92F9F5A32}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B5FE6C55-6B11-44AA-95A8-27E92F9F5A32}.Release|Any CPU.Build.0 = Release|Any CPU
{445B6CA2-A1A3-4565-B7E8-D5AE6A5AF0CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{445B6CA2-A1A3-4565-B7E8-D5AE6A5AF0CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{445B6CA2-A1A3-4565-B7E8-D5AE6A5AF0CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{445B6CA2-A1A3-4565-B7E8-D5AE6A5AF0CD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{445B6CA2-A1A3-4565-B7E8-D5AE6A5AF0CD} = {A14D061F-382D-4609-A3B0-E1D0BF7AB6AC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {105B0052-C7EA-44D0-8697-37A45E1392AF}
EndGlobalSection
EndGlobal

62
F50/F50.csproj Normal file
Просмотреть файл

@ -0,0 +1,62 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard1.0;netstandard2.0;Xamarin.iOS10;MonoAndroid80;uap10.0.16299</TargetFrameworks>
<AssemblyName>Xamarin.F50</AssemblyName>
<RootNamespace>Xamarin.F50</RootNamespace>
<PackageId>Xamarin.F50</PackageId>
<PackageIconUrl>http://xamarin.com/content/images/nuget/xamarin.png</PackageIconUrl>
<Summary>F50</Summary>
<PackageTags>xamarin, windows, ios, android, xamarin.forms, toolkit, f50</PackageTags>
<Title>F50</Title>
<Description>F50</Description>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<AssemblyFileVersion>1.0.0.0</AssemblyFileVersion>
<Version>1.0.0.0</Version>
<PackageVersion>1.0.0.0</PackageVersion>
<Authors>Xamarin Inc.</Authors>
<PackOnBuild>true</PackOnBuild>
<Owners>microsoft,Xamarin,XamarinNuGet</Owners>
<NeutralLanguage>en</NeutralLanguage>
<Copyright>Copyright 2018</Copyright>
<RepositoryUrl>https://github.com/xamarin/f50</RepositoryUrl>
<PackageReleaseNotes>See: https://github.com/xamarin/f50 </PackageReleaseNotes>
<LangVersion>default</LangVersion>
<DefineConstants>$(DefineConstants);</DefineConstants>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
<UseFullSemVerForNuGet>false</UseFullSemVerForNuGet>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<PackageLicenseUrl>https://raw.githubusercontent.com/xamarin/f50/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/xamarin/f50</PackageProjectUrl>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MSBuild.Sdk.Extras" Version="1.2.0" PrivateAssets="All" />
<Compile Include="**\*.shared.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.0' ">
<Compile Include="**\*.netstandard.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<Compile Include="**\*.netstandard.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'uap10.0.16299' ">
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.0.6" />
<Compile Include="**\*.uwp.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'MonoAndroid80' ">
<Compile Include="**\*.android.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'Xamarin.iOS10' ">
<Compile Include="**\*.ios.cs" />
</ItemGroup>
<Import Project="$(MSBuildSDKExtrasTargets)" Condition="Exists('$(MSBuildSDKExtrasTargets)')" />
</Project>

Просмотреть файл

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Xamarin.F50
{
public partial class Preferences
{
public void Set(string key, string val)
{
}
}
}

Просмотреть файл

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Xamarin.F50
{
public partial class Preferences
{
public void Set(string key, string val)
{
}
}
}

Просмотреть файл

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Xamarin.F50
{
public partial class Preferences
{
public void Set(string key, string val) =>
throw new NotImplentedInReferenceAssembly();
}
}

Просмотреть файл

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Xamarin.F50
{
/// <summary>
/// Shared code between preferences
/// Contains static methods and shared members
/// </summary>
public partial class Preferences
{
public static void DoStuff()
{
}
}
}

Просмотреть файл

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Xamarin.F50
{
public partial class Preferences
{
public void Set(string key, string val)
{
}
}
}

Просмотреть файл

@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Xamarin.F50
{
public static class PreferencesExtensions
{
}
}

Просмотреть файл

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Xamarin.F50
{
public class NotImplentedInReferenceAssembly : NotImplementedException
{
public NotImplentedInReferenceAssembly()
: base("This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.")
{
}
}
}