Skip to content

Commit

Permalink
Update full source and test of odata.net
Browse files Browse the repository at this point in the history
  • Loading branch information
lewischeng-ms committed Feb 17, 2015
1 parent 82f97ff commit 3445a85
Show file tree
Hide file tree
Showing 8,066 changed files with 2,074,811 additions and 373,548 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Line endings of all files should never be converted.
* -text
57 changes: 47 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,47 @@
[Dd]ebug/
[Bb]in
[Oo]bj
[Tt]est[Rr]esults
*.suo
*.exe
*.dll
*.sdf
*.opensdf
*.vsp
# Build output
bin/
obj/

# VS files
*.suo
*.DotSettings
*.user
*.vstemplate
!src/CodeGen/ODataT4CodeGenerator.vstemplate

# TFS files
*.vspscc

# Test results
sln/TestResults/

# VS2015 IDE generated files
sln/*.ide/

# StyleCop files
StyleCop.Cache

# Localization files
src/Microsoft.OData.Edm/Microsoft.OData.Edm.xml
src/Microsoft.OData.Core/Microsoft.OData.Core.xml
src/Microsoft.Spatial/Microsoft.Spatial.xml
src/Microsoft.OData.Client/Microsoft.OData.Client.xml
test/FunctionalTests/Service/Microsoft.OData.Service.xml
src/Microsoft.OData.Edm/Build.Orcas/Microsoft.OData.Edm.NetFX35.xml
src/Microsoft.OData.Core/Build.Orcas/Microsoft.OData.Core.NetFX35.xml
src/Microsoft.Spatial/Build.Orcas/Microsoft.Spatial.NetFX35.xml
src/Microsoft.OData.Client/Build.Portable/Microsoft.OData.Client.xml
src/CodeGen/Microsoft.OData.Service.Design.T4.xml
src/Web/GenExe/DataSvcUtil.xml
src/Web/ODataAdoNetProvider/DataFeedClient.35/Microsoft.Data.DataFeedClient.xml
src/Web/ODataAdoNetProvider/DataFeedClient.40/Microsoft.Data.DataFeedClient.xml
src/Web/Providers/EF6/Microsoft.OData.EntityFrameworkProvider.xml
test/FunctionalTests/Tools/Commander.Common/CsdlToWorkspaceGenerator.xml
test/FunctionalTests/Framework/AstoriaTestFramework.xml

# Downloaded Nuget packages
sln/packages/

# Test artifacts
test/FunctionalTests/Tests/Data/Northwind/Northwind.csdl1.csdl
test/FunctionalTests/Tests/Data/Northwind/Northwind.csdl2.csdl
111 changes: 111 additions & 0 deletions Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>

<PropertyGroup>
<!-- Global settings that apply unconditionally. -->
<EnlistmentRoot>$(MSBuildThisFileDirectory.TrimEnd('\'))</EnlistmentRoot>

<SilverlightClientLibraries>$(MSBuildProgramFiles32)\Microsoft SDKs\Silverlight\$(TargetFrameworkVersion)\Libraries\Client</SilverlightClientLibraries>

<!-- We only do test signing in OSS -->
<SigningScenario Condition="'$(SigningScenario)' == '' and '$(Configuration)' == 'Release'">$(SigningScenarioForRelease)</SigningScenario>
<SigningScenario Condition="'$(SigningScenario)' == ''">Test</SigningScenario>
<SigningType Condition="'$(SigningType)' == ''">Test</SigningType>
</PropertyGroup>

<PropertyGroup>
<!--Default generated assembly attributes-->
<AssemblyAttributeClsCompliant Condition="'$(AssemblyAttributeClsCompliant)' == ''">true</AssemblyAttributeClsCompliant>
<SecurityMigration Condition="'$(SecurityMigration)' == ''">true</SecurityMigration>
<AssemblyAttributeComVisible Condition="'$(AssemblyAttributeComVisible)' == ''">false</AssemblyAttributeComVisible>
<AssemblyAttributeComCompatibleSideBySide Condition="'$(AssemblyAttributeComCompatibleSideBySide)' == ''">false</AssemblyAttributeComCompatibleSideBySide>
<UseOwnAssemblyVersion Condition="'$(UseOwnAssemblyVersion)' == ''">false</UseOwnAssemblyVersion>
<NoRuntimeCompatibilityAttribute Condition="'$(NoRuntimeCompatibilityAttribute)' == ''">false</NoRuntimeCompatibilityAttribute>
<GenerateTargetFrameworkAttribute Condition="'$(GenerateTargetFrameworkAttribute)' == ''">false</GenerateTargetFrameworkAttribute>
<TransparentAssembly Condition="'$(TransparentAssembly)' == ''">false</TransparentAssembly>
<AssemblyAttributeSkipVerificationInFullTrust Condition="'$(AssemblyAttributeSkipVerificationInFullTrust)' == ''">true</AssemblyAttributeSkipVerificationInFullTrust>
</PropertyGroup>

<PropertyGroup>
<!--Define constants that are used in ...\src\AssemblyInfo\AssemblyInfoCommon.cs to generate assembly attributes-->
<DefineConstants Condition="'$(UseVsVersion)' == 'true'">$(DefineConstants);ASSEMBLY_ATTRIBUTE_PRODUCT_VS</DefineConstants>
<DefineConstants Condition="'$(AssemblyAttributeSuppressSecurityRules)' == 'true'">$(DefineConstants);SUPPRESS_SECURITY_RULES</DefineConstants>
<DefineConstants Condition="'$(AssemblyAttributeClsCompliant)' == 'true'">$(DefineConstants);ASSEMBLY_ATTRIBUTE_CLS_COMPLIANT</DefineConstants>
<DefineConstants Condition="'$(SecurityMigration)' == 'true'">$(DefineConstants);SECURITY_MIGRATION</DefineConstants>
<DefineConstants Condition="'$(AssemblyAttributeComVisible)' == 'true'">$(DefineConstants);ASSEMBLY_ATTRIBUTE_COM_VISIBLE</DefineConstants>
<DefineConstants Condition="'$(AssemblyAttributeComCompatibleSideBySide)' == 'true'">$(DefineConstants);ASSEMBLY_ATTRIBUTE_COM_COMPATIBLE_SIDEBYSIDE</DefineConstants>
<DefineConstants Condition="'$(TransparentAssembly)' == 'true'">$(DefineConstants);ASSEMBLY_ATTRIBUTE_TRANSPARENT_ASSEMBLY</DefineConstants>
<DefineConstants Condition="'$(AllowPartialTrustedCalls)' == 'true'">$(DefineConstants);ASSEMBLY_ATTRIBUTE_ALLOW_PARTIALLY_TRUSTED_CALLERS</DefineConstants>
<DefineConstants Condition="'$(ConditionalAPTCA_L2)' == 'true'">$(DefineConstants);ASSEMBLY_ATTRIBUTE_CONDITIONAL_APTCA_L2</DefineConstants>
<DefineConstants Condition="'$(AssemblyAttributeSkipVerificationInFullTrust)' == 'true'">$(DefineConstants);ASSEMBLY_ATTRIBUTE_SKIP_VERIFICATION_IN_FULLTRUST</DefineConstants>
<DefineConstants Condition="'$(TargetFrameworkVersion)' == 'v3.5'">$(DefineConstants);ASSEMBLY_ATTRIBUTE_NO_BUILD_NUM_IN_VERSION</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition ="'$(TargetFrameworkIdentifier)' == '.NETPortable'">
<DefineConstants>$(DefineConstants);PORTABLELIB;SUPPRESS_SECURITY_RULES;SUPPRESS_COM_VISIBLE_ATTRIBUTE;</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition ="'$(TargetFrameworkVersion)' == 'v3.5'">
<DefineConstants>$(DefineConstants);ORCAS;SUPPRESS_SECURITY_RULES</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<NoWarn>$(NoWarn);1699;1570;1572;1573;1591;1607</NoWarn>
<WarningsNotAsErrors>$(WarningsNotAsErrors);1058</WarningsNotAsErrors>
</PropertyGroup>

<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.vbproj'">
<!-- VB's prejudices against semi-colons extend to the defines passed to the compiler, so convert them to commas. Unescape string since string methods return escaped strings. -->
<DefineConstants>$([MSBuild]::Unescape($(DefineConstants.Replace(';',','))))</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release'">
<!--Overide the default full debug symbols regardless of configuration-->
<DebugType>pdbonly</DebugType>
</PropertyGroup>

<Import Project="$(EnlistmentRoot)\tools\CustomMSBuild\Build.props" />

<!-- NuGet packages settings -->
<PropertyGroup>
<SolutionDir>$(EnlistmentRoot)\sln</SolutionDir>
<NugetPack>$(SolutionDir)\packages</NugetPack>
<NuGetToolsPath>$(SolutionDir)\.nuget</NuGetToolsPath>
<NuGetExePath>$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<PackagesConfig>$(NuGetToolsPath)\packages.config</PackagesConfig>
</PropertyGroup>

<Target Name="RestoreNuGetPackages" BeforeTargets="$(GenerateTextStringResourcesDependsOn)">
<Exec Command="$(NuGetExePath) restore $(PackagesConfig) -PackageSaveMode nuspec -SolutionDirectory $(SolutionDir)" />
</Target>

<!-- StyleCop settings -->
<PropertyGroup>
<StyleCopTargets>$(NuGetPack)\StyleCop.MSBuild.4.7.49.0\build\StyleCop.MSBuild.Targets</StyleCopTargets>
</PropertyGroup>

<PropertyGroup>
<!--OData has some project files with the same name that are targeted for different framework platforms. Isolate their intermediate output folders-->
<IntermediateOutputPath Condition="$(TargetFrameworkFolderName) != ''">$(IntermediateOutputPath.TrimEnd('\'))\$(TargetFrameworkFolderName)</IntermediateOutputPath>

<!-- Scrub src/AssemblyInfo/AssemblyRefs.cs and .vb for conflicts and merge with AssemblyInfoCommon files. -->
<DataFxIncPath>$(EnlistmentRoot)\src\AssemblyInfo</DataFxIncPath>

<!-- Define where our AssemblyKeys.cs file which defines public keys for InternalsVisibleTo attributes is -->
<AssemblyKeysCSharpFilePath>$(DataFxIncPath)\AssemblyKeys.cs</AssemblyKeysCSharpFilePath>

<!-- Install directory of Visual Studio e.g. C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ -->
<VisualStudioInstallLocation Condition="'$(VisualStudioVersion)' == '12.0'">$(VS120COMNTOOLS)..\IDE\</VisualStudioInstallLocation>
<VisualStudioInstallLocation Condition="'$(VisualStudioVersion)' == '14.0'">$(VS140COMNTOOLS)..\IDE\</VisualStudioInstallLocation>
</PropertyGroup>

<!--These empty property groups are used to ensure x64, x86 and AnyCPU are included in the platform list.
VS will pick AnyCPU as the default purely because of alphabetic order.-->
<PropertyGroup Condition="'$(Platform)' == 'x64'" />
<PropertyGroup Condition="'$(Platform)' == 'x86'" />
<PropertyGroup Condition="'$(Platform)' == 'AnyCPU'" />

</Project>
18 changes: 9 additions & 9 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
OData .NET Libraries ver. 6.9.0
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
OData .NET Libraries ver. 6.10
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions build.root
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Marker file indicating root of build system.
12 changes: 12 additions & 0 deletions sln/.nuget/NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="OData Feed" value="https://www.myget.org/F/odata/" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
Binary file added sln/.nuget/NuGet.exe
Binary file not shown.
144 changes: 144 additions & 0 deletions sln/.nuget/NuGet.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>

<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>

<!-- Property that enables building a package from a project -->
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>

<!-- Determines if package restore consent is required to restore packages -->
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>

<!-- Download NuGet.exe if it does not already exist -->
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
</PropertyGroup>

<ItemGroup Condition=" '$(PackageSources)' == '' ">
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
<!--
<PackageSource Include="https://www.nuget.org/api/v2/" />
<PackageSource Include="https://my-nuget-source/nuget/" />
-->
</ItemGroup>

<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
<!-- Windows specific commands -->
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
</PropertyGroup>

<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
</PropertyGroup>

<PropertyGroup>
<PackagesProjectConfig Condition=" '$(OS)' == 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>
<PackagesProjectConfig Condition=" '$(OS)' != 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config</PackagesProjectConfig>
</PropertyGroup>

<PropertyGroup>
<PackagesConfig Condition="Exists('$(MSBuildProjectDirectory)\packages.config')">$(MSBuildProjectDirectory)\packages.config</PackagesConfig>
<PackagesConfig Condition="Exists('$(PackagesProjectConfig)')">$(PackagesProjectConfig)</PackagesConfig>
</PropertyGroup>

<PropertyGroup>
<!-- NuGet command -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>

<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 "$(NuGetExePath)"</NuGetCommand>

<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>

<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>

<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>

<!-- Commands -->
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>

<!-- We need to ensure packages are restored prior to assembly resolve -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
RestorePackages;
$(BuildDependsOn);
</BuildDependsOn>

<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
$(BuildDependsOn);
BuildPackage;
</BuildDependsOn>
</PropertyGroup>

<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate nuget.exe -->
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
<!--
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
This effectively acts as a lock that makes sure that the download operation will only happen once and all
parallel builds will have to wait for it to complete.
-->
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
</Target>

<Target Name="_DownloadNuGet">
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
</Target>

<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)"
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />

<Exec Command="$(RestoreCommand)"
LogStandardErrorAsError="true"
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
</Target>

<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(BuildCommand)"
Condition=" '$(OS)' != 'Windows_NT' " />

<Exec Command="$(BuildCommand)"
LogStandardErrorAsError="true"
Condition=" '$(OS)' == 'Windows_NT' " />
</Target>

<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<OutputFilename ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Net" />
<Using Namespace="Microsoft.Build.Framework" />
<Using Namespace="Microsoft.Build.Utilities" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try {
OutputFilename = Path.GetFullPath(OutputFilename);
Log.LogMessage("Downloading latest version of NuGet.exe...");
WebClient webClient = new WebClient();
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
return true;
}
catch (Exception ex) {
Log.LogErrorFromException(ex);
return false;
}
]]>
</Code>
</Task>
</UsingTask>
</Project>
Loading

0 comments on commit 3445a85

Please sign in to comment.