http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/e387fc92/JSLib/JSLib.csproj
----------------------------------------------------------------------
diff --git a/JSLib/JSLib.csproj b/JSLib/JSLib.csproj
index bff96ae..c24e81e 100644
--- a/JSLib/JSLib.csproj
+++ b/JSLib/JSLib.csproj
@@ -1,131 +1,187 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
-       <PropertyGroup>
-               <Configuration Condition=" '$(Configuration)' == '' 
">Debug</Configuration>
-               <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-               <ProductVersion>
-               </ProductVersion>
-               <SchemaVersion>2.0</SchemaVersion>
-               
<ProjectGuid>{73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}</ProjectGuid>
-               
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
-               <OutputType>Library</OutputType>
-               <AppDesignerFolder>Properties</AppDesignerFolder>
-               <RootNamespace>JSLib</RootNamespace>
-               <AssemblyName>JSLib</AssemblyName>
-               <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
-               <UseIISExpress>false</UseIISExpress>
-       </PropertyGroup>
-       <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 
'Debug|AnyCPU' ">
-               <DebugSymbols>true</DebugSymbols>
-               <DebugType>full</DebugType>
-               <Optimize>false</Optimize>
-               <OutputPath>bin\</OutputPath>
-               <DefineConstants>DEBUG;TRACE</DefineConstants>
-               <ErrorReport>prompt</ErrorReport>
-               <WarningLevel>4</WarningLevel>
-       </PropertyGroup>
-       <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 
'Release|AnyCPU' ">
-               <DebugType>pdbonly</DebugType>
-               <Optimize>true</Optimize>
-               <OutputPath>bin\</OutputPath>
-               <DefineConstants>TRACE</DefineConstants>
-               <ErrorReport>prompt</ErrorReport>
-               <WarningLevel>4</WarningLevel>
-       </PropertyGroup>
-       <ItemGroup>
-               <!-- Product code. -->
-               <Content Include="src\cache-source.js"/>
-               <Content Include="src\odata-gml.js"/>
-               <Content Include="src\utils.js"/>
-               <Content Include="src\odata-json-light.js"/>
-               <Content Include="src\datajs.js"/>
-               <Content Include="src\cache.js"/>
-               <Content Include="src\deferred.js"/>
-               <Content Include="src\odata.js"/>
-               <Content Include="src\odata-batch.js"/>
-               <Content Include="src\odata-handler.js"/>
-               <Content Include="src\odata-utils.js"/>
-               <Content Include="src\odata-xml.js"/>
-               <Content Include="src\odata-metadata.js"/>
-               <Content Include="src\odata-json.js"/>
-               <Content Include="src\odata-atom.js"/>
-               <Content Include="src\odata-net.js"/>
-               <Content Include="src\store-dom.js"/>
-               <Content Include="src\store-indexeddb.js"/>
-               <Content Include="src\store-memory.js"/>
-               <Content Include="src\store.js"/>
-               <Content Include="src\xml.js"/>
-               <Content Include="tests\common\djstest.js"/>
-               <Content Include="tests\common\ODataReadOracle.js"/>
-               <Content Include="tests\common\ODataReadOracle.svc"/>
-               <Content Include="tests\common\TestLogger.svc"/>
-               <Content Include="tests\common\TestSynchronizerClient.js"/>
-               <Content Include="tests\endpoints\FoodStoreDataServiceV3.svc"/>
-               <Content Include="tests\endpoints\FoodStoreDataService.svc"/>
-               <Content Include="tests\endpoints\FoodStoreDataServiceV2.svc"/>
-               <Content Include="tests\endpoints\web.config"/>
-               <Content Include="tests\odata-atom-tests.js"/>
-               <Content Include="tests\odata-qunit-tests.htm"/>
-               <Content Include="tests\run-tests.wsf"/>
-               <Content Include="tests\test-list.js"/>
-               <!-- Configuration file for the web project. -->
-               <Content Include="Web.config"/>
-       </ItemGroup>
-       <ItemGroup>
-               <Compile Include="tests\code\AtomReader.cs"/>
-               <Compile Include="tests\code\CsdlReader.cs"/>
-               <Compile Include="tests\code\JsDate.cs"/>
-               <Compile Include="tests\code\JsonObject.cs"/>
-               <Compile Include="tests\code\ReaderUtils.cs"/>
-               <Compile Include="tests\code\ReflectionDataContext.cs"/>
-       </ItemGroup>
-       <ItemGroup>
-       </ItemGroup>
-       <ItemGroup>
-               <Reference Include="Microsoft.Data.Edm, Version=5.1.0.0, 
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-                       
<HintPath>packages\Microsoft.Data.Edm.5.1.0\lib\net40\Microsoft.Data.Edm.dll</HintPath>
-               </Reference>
-               <Reference Include="Microsoft.Data.OData, Version=5.1.0.0, 
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-                       
<HintPath>packages\Microsoft.Data.OData.5.1.0\lib\net40\Microsoft.Data.OData.dll</HintPath>
-               </Reference>
-               <Reference Include="Microsoft.Data.Services, Version=5.1.0.0, 
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-                       
<HintPath>packages\Microsoft.Data.Services.5.1.0\lib\net40\Microsoft.Data.Services.dll</HintPath>
-               </Reference>
-               <Reference Include="Microsoft.Data.Services.Client, 
Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, 
processorArchitecture=MSIL">
-                       
<HintPath>packages\Microsoft.Data.Services.Client.5.1.0\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
-               </Reference>
-               <Reference Include="System"/>
-               <Reference Include="System.Net"/>
-               <Reference Include="System.Runtime.Serialization"/>
-               <Reference Include="System.ServiceModel"/>
-               <Reference Include="System.ServiceModel.Activation"/>
-               <Reference Include="System.ServiceModel.Web"/>
-               <Reference Include="System.Spatial, Version=5.1.0.0, 
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-                       
<HintPath>packages\System.Spatial.5.1.0\lib\net40\System.Spatial.dll</HintPath>
-               </Reference>
-               <Reference Include="System.Web.Extensions"/>
-               <Reference Include="System.Xml"/>
-               <Reference Include="System.Xml.Linq"/>
-       </ItemGroup>
-       <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets"/>
-       <Import 
Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets"/>
-       <ProjectExtensions>
-               <VisualStudio>
-                       <FlavorProperties 
GUID="{349c5851-65df-11da-9384-00065b846f21}">
-                               <WebProjectProperties>
-                                       <UseIIS>False</UseIIS>
-                                       <AutoAssignPort>True</AutoAssignPort>
-                                       
<DevelopmentServerPort>10092</DevelopmentServerPort>
-                                       
<DevelopmentServerVPath>/</DevelopmentServerVPath>
-                                       <IISUrl>
-                                       </IISUrl>
-                                       
<NTLMAuthentication>False</NTLMAuthentication>
-                                       <UseCustomServer>False</UseCustomServer>
-                                       <CustomServerUrl>
-                                       </CustomServerUrl>
-                                       
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
-                               </WebProjectProperties>
-                       </FlavorProperties>
-               </VisualStudio>
-       </ProjectExtensions>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>
+    </ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}</ProjectGuid>
+    
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>JSLib</RootNamespace>
+    <AssemblyName>JSLib</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <SccProjectName>SAK</SccProjectName>
+    <SccLocalPath>SAK</SccLocalPath>
+    <SccAuxPath>SAK</SccAuxPath>
+    <SccProvider>SAK</SccProvider>
+    <UseIISExpress>false</UseIISExpress>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' 
">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 
'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <!-- Product code. -->
+    <Content Include="src\cache-source.js" />
+    <Content Include="src\odata-gml.js" />
+    <Content Include="src\utils.js" />
+    <Content Include="src\odata-json-light.js" />
+    <Content Include="src\datajs.js" />
+    <Content Include="src\cache.js" />
+    <Content Include="src\deferred.js" />
+    <Content Include="src\odata.js" />
+    <Content Include="src\odata-batch.js" />
+    <Content Include="src\odata-handler.js" />
+    <Content Include="src\odata-utils.js" />
+    <Content Include="src\odata-xml.js" />
+    <Content Include="src\odata-metadata.js" />
+    <Content Include="src\odata-json.js" />
+    <Content Include="src\odata-atom.js" />
+    <Content Include="src\odata-net.js" />
+    <Content Include="src\store-dom.js" />
+    <Content Include="src\store-indexeddb.js" />
+    <Content Include="src\store-memory.js" />
+    <Content Include="src\store.js" />
+    <Content Include="src\xml.js" />
+    <Content Include="tests\cache-tests.js" />
+    <Content Include="tests\common\CacheOracle.js" />
+    <Content Include="tests\common\Instrument.svc" />
+    <Content Include="tests\common\Instrument.js" />
+    <Content Include="tests\common\mockXMLHttpRequest.js" />
+    <Content Include="tests\common\mockHttpClient.js" />
+    <Content Include="tests\common\djstest.js" />
+    <Content Include="tests\common\gpo-ie8-tour-disable.reg" />
+    <Content Include="tests\common\ObservableHttpClient.js" />
+    <Content Include="tests\common\ODataReadOracle.js" />
+    <Content Include="tests\common\ODataReadOracle.svc" />
+    <Content Include="tests\common\rx.js" />
+    <Content Include="tests\common\TestLogger.svc" />
+    <Content Include="tests\common\TestSynchronizerClient.js" />
+    <Content Include="tests\odata-json-light-tests.js" />
+    <Content Include="tests\datajs-startup-perf-test.html" />
+    <Content Include="tests\endpoints\BasicAuthDataService.svc" />
+    <Content Include="tests\endpoints\FoodStoreDataServiceV4.svc" />
+    <Content Include="tests\endpoints\CustomAnnotations.xml" />
+    <Content Include="tests\endpoints\CustomDataService.svc" />
+    <Content Include="tests\endpoints\EpmDataService.svc" />
+    <Content Include="tests\endpoints\ErrorDataService.svc" />
+    <Content Include="tests\endpoints\LargeCollectionService.svc" />
+    <Content Include="tests\endpoints\web.config" />
+    <Content 
Include="tests\datajs-cache-large-collection-functional-tests.html" />
+    <Content Include="tests\datajs-cache-large-collection-functional-tests.js" 
/>
+    <Content Include="tests\datajs-cache-long-haul-tests.html" />
+    <Content Include="tests\odata-atom-tests.js" />
+    <Content Include="tests\odata-batch-functional-tests.html" />
+    <Content Include="tests\odata-batch-functional-tests.js" />
+    <Content Include="tests\odata-batch-tests.js" />
+    <Content Include="tests\odata-cache-filter-functional-tests.html" />
+    <Content Include="tests\odata-cache-filter-functional-tests.js" />
+    <Content Include="tests\odata-cache-fperf-tests.html" />
+    <Content Include="tests\odata-cache-fperf-tests.js" />
+    <Content Include="tests\odata-cache-functional-tests.html" />
+    <Content Include="tests\odata-cache-functional-tests.js" />
+    <Content Include="tests\odata-cache-rx-functional-tests.html" />
+    <Content Include="tests\odata-cache-rx-functional-tests.js" />
+    <Content Include="tests\odata-fuzz.html" />
+    <Content Include="tests\odata-metadata-tests.js" />
+    <Content Include="tests\odata-handler-tests.js" />
+    <Content Include="tests\odata-json-tests.js" />
+    <Content Include="tests\odata-links-functional-tests.html" />
+    <Content Include="tests\odata-links-functional-tests.js" />
+    <Content Include="tests\odata-metadata-awareness-functional-tests.html" />
+    <Content Include="tests\odata-metadata-awareness-functional-tests.js" />
+    <Content Include="tests\odata-net-tests.js" />
+    <Content Include="tests\odata-perf-tests.html" />
+    <Content Include="tests\odata-perf-tests.js" />
+    <Content Include="tests\odata-read-crossdomain-functional-tests.html" />
+    <Content Include="tests\odata-read-crossdomain-functional-tests.js" />
+    <Content Include="tests\odata-read-functional-tests.html" />
+    <Content Include="tests\odata-request-functional-tests.html" />
+    <Content Include="tests\odata-request-functional-tests.js" />
+    <Content Include="tests\odata-read-functional-tests.js" />
+    <Content Include="tests\odata-qunit-tests.htm" />
+    <Content Include="tests\odata-tests.js" />
+    <Content Include="tests\odata-xml-tests.js" />
+    <Content Include="tests\run-tests.wsf" />
+    <Content Include="tests\store-indexeddb-tests.js" />
+    <Content Include="tests\store-tests.js" />
+    <Content Include="tests\test-list.js" />
+    <Content Include="tests\test-manager.html" />
+    <!-- Configuration file for the web project. -->
+    <Content Include="Web.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="tests\code\AtomReader.cs" />
+    <Compile Include="tests\code\CsdlReader.cs" />
+    <Compile Include="tests\code\JsDate.cs" />
+    <Compile Include="tests\code\JsonObject.cs" />
+    <Compile Include="tests\code\ReaderUtils.cs" />
+    <Compile Include="tests\code\ReflectionDataContext.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.OData.Client, Version=6.0.0.0, 
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      
<HintPath>packages\Microsoft.OData.Client.6.0.0-beta1\lib\net40\Microsoft.OData.Client.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.OData.Core">
+      
<HintPath>packages\Microsoft.OData.Core.6.0.0-beta1\lib\portable-net40+sl5+wp8+win8\Microsoft.OData.Core.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.OData.Edm">
+      
<HintPath>packages\Microsoft.OData.Edm.6.0.0-beta1\lib\portable-net40+sl5+wp8+win8\Microsoft.OData.Edm.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.OData.Service, Version=6.0.0.0, 
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      
<HintPath>packages\Microsoft.OData.Service.6.0.0-beta1\lib\net40\Microsoft.OData.Service.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Spatial">
+      
<HintPath>packages\Microsoft.Spatial.6.0.0-beta1\lib\portable-net40+sl5+wp8+win8\Microsoft.Spatial.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Net" />
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.ServiceModel" />
+    <Reference Include="System.ServiceModel.Activation" />
+    <Reference Include="System.ServiceModel.Web" />
+    <Reference Include="System.Web.Extensions" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Xml.Linq" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <Import 
Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets"
 />
+  <ProjectExtensions>
+    <VisualStudio>
+      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+        <WebProjectProperties>
+          <UseIIS>False</UseIIS>
+          <AutoAssignPort>True</AutoAssignPort>
+          <DevelopmentServerPort>46541</DevelopmentServerPort>
+          <DevelopmentServerVPath>/</DevelopmentServerVPath>
+          <IISUrl>
+          </IISUrl>
+          <NTLMAuthentication>False</NTLMAuthentication>
+          <UseCustomServer>False</UseCustomServer>
+          <CustomServerUrl>
+          </CustomServerUrl>
+          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+        </WebProjectProperties>
+      </FlavorProperties>
+    </VisualStudio>
+  </ProjectExtensions>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/e387fc92/JSLib/JSLib.sln
----------------------------------------------------------------------
diff --git a/JSLib/JSLib.sln b/JSLib/JSLib.sln
index b87a0df..6f4e702 100644
--- a/JSLib/JSLib.sln
+++ b/JSLib/JSLib.sln
@@ -1,20 +1,20 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JSLib", "JSLib.csproj", 
"{73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}"
-EndProject
-Global
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution
-               Debug|Any CPU = Debug|Any CPU
-               Release|Any CPU = Release|Any CPU
-       EndGlobalSection
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}.Debug|Any CPU.ActiveCfg 
= Debug|Any CPU
-               {73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}.Debug|Any CPU.Build.0 = 
Debug|Any CPU
-               {73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}.Release|Any 
CPU.ActiveCfg = Release|Any CPU
-               {73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}.Release|Any CPU.Build.0 
= Release|Any CPU
-       EndGlobalSection
-       GlobalSection(SolutionProperties) = preSolution
-               HideSolutionNode = FALSE
-       EndGlobalSection
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JSLib", "JSLib.csproj", 
"{73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}"
+EndProject
+Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Any CPU = Debug|Any CPU
+               Release|Any CPU = Release|Any CPU
+       EndGlobalSection
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}.Debug|Any CPU.ActiveCfg 
= Debug|Any CPU
+               {73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}.Debug|Any CPU.Build.0 = 
Debug|Any CPU
+               {73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}.Release|Any 
CPU.ActiveCfg = Release|Any CPU
+               {73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}.Release|Any CPU.Build.0 
= Release|Any CPU
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE
+       EndGlobalSection
 EndGlobal
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/e387fc92/JSLib/Web.config
----------------------------------------------------------------------
diff --git a/JSLib/Web.config b/JSLib/Web.config
index 142a457..0fa6b99 100644
--- a/JSLib/Web.config
+++ b/JSLib/Web.config
@@ -1,34 +1,34 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
-  <system.web>
-    <compilation debug="true" targetFramework="4.0">
-      <assemblies>
-        <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=B77A5C561934E089" />
-        <add assembly="System.Data.DataSetExtensions, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=B77A5C561934E089" />
-        <add assembly="System.Web.Extensions, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
-        <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=B77A5C561934E089" />
-        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=B77A5C561934E089" />
-        <add assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=B77A5C561934E089" />
-        <add assembly="System.ServiceModel.Web, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
-        <add assembly="Microsoft.Data.OData, Version=5.1, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35" />
-        <add assembly="Microsoft.Data.Services, Version=5.1, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35" />
-        <add assembly="Microsoft.Data.Services.Client, Version=5.1, 
Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
-      </assemblies>
-    </compilation>
-  </system.web>
-  <system.webServer>
-    <directoryBrowse enabled="true" />
-  </system.webServer>
-  <system.codedom>
-    <compilers>
-      <compiler language="c#;cs;csharp" extension=".cs" 
type="Microsoft.CSharp.CSharpCodeProvider,System, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089">
-        <providerOption name="CompilerVersion" value="v4.0" />
-      </compiler>
-    </compilers>
-  </system.codedom>
-  <system.net>
-    <defaultProxy>
-      <proxy autoDetect="True" />
-    </defaultProxy>
-  </system.net>
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <system.web>
+    <compilation debug="true" targetFramework="4.0">
+      <assemblies>
+        <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=B77A5C561934E089" />
+        <add assembly="System.Data.DataSetExtensions, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=B77A5C561934E089" />
+        <add assembly="System.Web.Extensions, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
+        <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=B77A5C561934E089" />
+        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=B77A5C561934E089" />
+        <add assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=B77A5C561934E089" />
+        <add assembly="System.ServiceModel.Web, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
+        <add assembly="Microsoft.OData.Core, Version=6.0.0.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35" />
+        <add assembly="Microsoft.OData.Service, Version=6.0.0.0, 
Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+        <add assembly="Microsoft.OData.Client, Version=6.0.0.0, 
Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+      </assemblies>
+    </compilation>
+  </system.web>
+  <system.webServer>
+    <directoryBrowse enabled="true" />
+  </system.webServer>
+  <system.codedom>
+    <compilers>
+      <compiler language="c#;cs;csharp" extension=".cs" 
type="Microsoft.CSharp.CSharpCodeProvider,System, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089">
+        <providerOption name="CompilerVersion" value="v4.0" />
+      </compiler>
+    </compilers>
+  </system.codedom>
+  <system.net>
+    <defaultProxy>
+      <proxy autoDetect="True" />
+    </defaultProxy>
+  </system.net>
 </configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/e387fc92/JSLib/src/cache-source.js
----------------------------------------------------------------------
diff --git a/JSLib/src/cache-source.js b/JSLib/src/cache-source.js
index 3616b84..f79d316 100644
--- a/JSLib/src/cache-source.js
+++ b/JSLib/src/cache-source.js
@@ -1,183 +1,197 @@
-/// <reference path="odata-utils.js" />
-
-// Copyright (c) Microsoft Open Technologies, Inc.  All rights reserved.
-// 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.
-
-// cache-source.js
-
-(function (window, undefined) {
-
-    var datajs = window.datajs || {};
-    var odata = window.OData || {};
-
-    var parseInt10 = datajs.parseInt10;
-    var normalizeURICase = datajs.normalizeURICase;
-
-    // CONTENT START
-
-    var appendQueryOption = function (uri, queryOption) {
-        /// <summary>Appends the specified escaped query option to the 
specified URI.</summary>
-        /// <param name="uri" type="String">URI to append option to.</param>
-        /// <param name="queryOption" type="String">Escaped query option to 
append.</param>
-        var separator = (uri.indexOf("?") >= 0) ? "&" : "?";
-        return uri + separator + queryOption;
-    };
-
-    var appendSegment = function (uri, segment) {
-        /// <summary>Appends the specified segment to the given URI.</summary>
-        /// <param name="uri" type="String">URI to append a segment to.</param>
-        /// <param name="segment" type="String">Segment to append.</param>
-        /// <returns type="String">The original URI with a new segment 
appended.</returns>
-
-        var index = uri.indexOf("?");
-        var queryPortion = "";
-        if (index >= 0) {
-            queryPortion = uri.substr(index);
-            uri = uri.substr(0, index);
-        }
-
-        if (uri[uri.length - 1] !== "/") {
-            uri += "/";
-        }
-        return uri + segment + queryPortion;
-    };
-
-    var buildODataRequest = function (uri, options) {
-        /// <summary>Builds a request object to GET the specified 
URI.</summary>
-        /// <param name="uri" type="String">URI for request.</param>
-        /// <param name="options" type="Object">Additional options.</param>
-
-        return {
-            method: "GET",
-            requestUri: uri,
-            user: options.user,
-            password: options.password,
-            enableJsonpCallback: options.enableJsonpCallback,
-            callbackParameterName: options.callbackParameterName,
-            formatQueryString: options.formatQueryString
-        };
-    };
-
-    var findQueryOptionStart = function (uri, name) {
-        /// <summary>Finds the index where the value of a query option 
starts.</summary>
-        /// <param name="uri" type="String">URI to search in.</param>
-        /// <param name="name" type="String">Name to look for.</param>
-        /// <returns type="Number">The index where the query option 
starts.</returns>
-
-        var result = -1;
-        var queryIndex = uri.indexOf("?");
-        if (queryIndex !== -1) {
-            var start = uri.indexOf("?" + name + "=", queryIndex);
-            if (start === -1) {
-                start = uri.indexOf("&" + name + "=", queryIndex);
-            }
-            if (start !== -1) {
-                result = start + name.length + 2;
-            }
-        }
-        return result;
-    };
-
-    var queryForData = function (uri, options, success, error) {
-        /// <summary>Gets data from an OData service.</summary>
-        /// <param name="uri" type="String">URI to the OData service.</param>
-        /// <param name="options" type="Object">Object with additional 
well-known request options.</param>
-        /// <param name="success" type="Function">Success callback.</param>
-        /// <param name="error" type="Function">Error callback.</param>
-        /// <returns type="Object">Object with an abort method.</returns>
-
-        var request = queryForDataInternal(uri, options, [], success, error);
-        return request;
-    };
-
-    var queryForDataInternal = function (uri, options, data, success, error) {
-        /// <summary>Gets data from an OData service taking into consideration 
server side paging.</summary>
-        /// <param name="uri" type="String">URI to the OData service.</param>
-        /// <param name="options" type="Object">Object with additional 
well-known request options.</param>
-        /// <param name="data" type="Array">Array that stores the data 
provided by the OData service.</param>
-        /// <param name="success" type="Function">Success callback.</param>
-        /// <param name="error" type="Function">Error callback.</param>
-        /// <returns type="Object">Object with an abort method.</returns>
-
-        var request = buildODataRequest(uri, options);
-        var currentRequest = odata.request(request, function (newData) {
-            var next = newData.__next;
-            var results = newData.results;
-
-            data = data.concat(results);
-
-            if (next) {
-                currentRequest = queryForDataInternal(next, options, data, 
success, error);
-            } else {
-                success(data);
-            }
-        }, error, undefined, options.httpClient, options.metadata);
-
-        return {
-            abort: function () {
-                currentRequest.abort();
-            }
-        };
-    };
-
-    var ODataCacheSource = function (options) {
-        /// <summary>Creates a data cache source object for requesting data 
from an OData service.</summary>
-        /// <param name="options">Options for the cache data source.</param>
-        /// <returns type="ODataCacheSource">A new data cache source 
instance.</returns>
-
-        var that = this;
-        var uri = options.source;
-        
-        that.identifier = normalizeURICase(encodeURI(decodeURI(uri)));
-        that.options = options;
-
-        that.count = function (success, error) {
-            /// <summary>Gets the number of items in the collection.</summary>
-            /// <param name="success" type="Function">Success callback with 
the item count.</param>
-            /// <param name="error" type="Function">Error callback.</param>
-            /// <returns type="Object">Request object with an abort 
method./<param>
-
-            var options = that.options;
-            return odata.request(
-                buildODataRequest(appendSegment(uri, "$count"), options),
-                function (data) {
-                    var count = parseInt10(data.toString());
-                    if (isNaN(count)) {
-                        error({ message: "Count is NaN", count: count });
-                    } else {
-                        success(count);
-                    }
-                }, error, undefined, options.httpClient, options.metadata);
-        };
-
-        that.read = function (index, count, success, error) {
-            /// <summary>Gets a number of consecutive items from the 
collection.</summary>
-            /// <param name="index" type="Number">Zero-based index of the 
items to retrieve.</param>
-            /// <param name="count" type="Number">Number of items to 
retrieve.</param>
-            /// <param name="success" type="Function">Success callback with 
the requested items.</param>
-            /// <param name="error" type="Function">Error callback.</param>
-            /// <returns type="Object">Request object with an abort 
method./<param>
-
-            var queryOptions = "$skip=" + index + "&$top=" + count;
-            return queryForData(appendQueryOption(uri, queryOptions), 
that.options, success, error);
-        };
-
-        return that;
-    };
-
-    // DATAJS INTERNAL START
-    window.datajs.ODataCacheSource = ODataCacheSource;
-    // DATAJS INTERNAL END
-
-    // CONTENT END
+/// <reference path="odata-utils.js" />
+
+// Copyright (c) Microsoft Open Technologies, Inc.  All rights reserved.
+// 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.
+
+// cache-source.js
+
+(function (window, undefined) {
+
+    var datajs = window.datajs || {};
+    var odata = window.OData || {};
+    var parseInt10 = datajs.parseInt10;
+    var normalizeURICase = datajs.normalizeURICase;
+
+    // CONTENT START
+
+    var appendQueryOption = function (uri, queryOption) {
+        /// <summary>Appends the specified escaped query option to the 
specified URI.</summary>
+        /// <param name="uri" type="String">URI to append option to.</param>
+        /// <param name="queryOption" type="String">Escaped query option to 
append.</param>
+        var separator = (uri.indexOf("?") >= 0) ? "&" : "?";
+        return uri + separator + queryOption;
+    };
+
+    var appendSegment = function (uri, segment) {
+        /// <summary>Appends the specified segment to the given URI.</summary>
+        /// <param name="uri" type="String">URI to append a segment to.</param>
+        /// <param name="segment" type="String">Segment to append.</param>
+        /// <returns type="String">The original URI with a new segment 
appended.</returns>
+
+        var index = uri.indexOf("?");
+        var queryPortion = "";
+        if (index >= 0) {
+            queryPortion = uri.substr(index);
+            uri = uri.substr(0, index);
+        }
+
+        if (uri[uri.length - 1] !== "/") {
+            uri += "/";
+        }
+        return uri + segment + queryPortion;
+    };
+
+    var buildODataRequest = function (uri, options) {
+        /// <summary>Builds a request object to GET the specified 
URI.</summary>
+        /// <param name="uri" type="String">URI for request.</param>
+        /// <param name="options" type="Object">Additional options.</param>
+
+        return {
+            method: "GET",
+            requestUri: uri,
+            user: options.user,
+            password: options.password,
+            enableJsonpCallback: options.enableJsonpCallback,
+            callbackParameterName: options.callbackParameterName,
+            formatQueryString: options.formatQueryString
+        };
+    };
+
+    var findQueryOptionStart = function (uri, name) {
+        /// <summary>Finds the index where the value of a query option 
starts.</summary>
+        /// <param name="uri" type="String">URI to search in.</param>
+        /// <param name="name" type="String">Name to look for.</param>
+        /// <returns type="Number">The index where the query option 
starts.</returns>
+
+        var result = -1;
+        var queryIndex = uri.indexOf("?");
+        if (queryIndex !== -1) {
+            var start = uri.indexOf("?" + name + "=", queryIndex);
+            if (start === -1) {
+                start = uri.indexOf("&" + name + "=", queryIndex);
+            }
+            if (start !== -1) {
+                result = start + name.length + 2;
+            }
+        }
+        return result;
+    };
+
+    var queryForData = function (uri, options, success, error) {
+        /// <summary>Gets data from an OData service.</summary>
+        /// <param name="uri" type="String">URI to the OData service.</param>
+        /// <param name="options" type="Object">Object with additional 
well-known request options.</param>
+        /// <param name="success" type="Function">Success callback.</param>
+        /// <param name="error" type="Function">Error callback.</param>
+        /// <returns type="Object">Object with an abort method.</returns>
+
+        var request = queryForDataInternal(uri, options, {}, success, error);
+        return request;
+    };
+
+    var queryForDataInternal = function (uri, options, data, success, error) {
+        /// <summary>Gets data from an OData service taking into consideration 
server side paging.</summary>
+        /// <param name="uri" type="String">URI to the OData service.</param>
+        /// <param name="options" type="Object">Object with additional 
well-known request options.</param>
+        /// <param name="data" type="Array">Array that stores the data 
provided by the OData service.</param>
+        /// <param name="success" type="Function">Success callback.</param>
+        /// <param name="error" type="Function">Error callback.</param>
+        /// <returns type="Object">Object with an abort method.</returns>
+
+        var request = buildODataRequest(uri, options);
+        var currentRequest = odata.request(request, function (newData) {
+            var nextLink = newData["@odata.nextLink"];
+            if (nextLink) {
+                var index = uri.indexOf(".svc/", 0);
+                if (index != -1) {
+                    nextLink = uri.substring(0, index + 5) + nextLink;
+                }
+            }
+
+            if (data.value && newData.value) {
+                data.value = data.value.concat(newData.value);
+            }
+            else {
+                for (var property in newData) {
+                    if (property != "@odata.nextLink") {
+                        data[property] = newData[property];
+                    }
+                }
+            }
+
+            if (nextLink) {
+                currentRequest = queryForDataInternal(nextLink, options, data, 
success, error);
+            }
+            else {
+                success(data);
+            }
+        }, error, undefined, options.httpClient, options.metadata);
+
+        return {
+            abort: function () {
+                currentRequest.abort();
+            }
+        };
+    };
+
+    var ODataCacheSource = function (options) {
+        /// <summary>Creates a data cache source object for requesting data 
from an OData service.</summary>
+        /// <param name="options">Options for the cache data source.</param>
+        /// <returns type="ODataCacheSource">A new data cache source 
instance.</returns>
+
+        var that = this;
+        var uri = options.source;
+
+        that.identifier = normalizeURICase(encodeURI(decodeURI(uri)));
+        that.options = options;
+
+        that.count = function (success, error) {
+            /// <summary>Gets the number of items in the collection.</summary>
+            /// <param name="success" type="Function">Success callback with 
the item count.</param>
+            /// <param name="error" type="Function">Error callback.</param>
+            /// <returns type="Object">Request object with an abort 
method./<param>
+
+            var options = that.options;
+            return odata.request(
+                buildODataRequest(appendSegment(uri, "$count"), options),
+                function (data) {
+                    var count = parseInt10(data.toString());
+                    if (isNaN(count)) {
+                        error({ message: "Count is NaN", count: count });
+                    } else {
+                        success(count);
+                    }
+                }, error, undefined, options.httpClient, options.metadata);
+        };
+
+        that.read = function (index, count, success, error) {
+            /// <summary>Gets a number of consecutive items from the 
collection.</summary>
+            /// <param name="index" type="Number">Zero-based index of the 
items to retrieve.</param>
+            /// <param name="count" type="Number">Number of items to 
retrieve.</param>
+            /// <param name="success" type="Function">Success callback with 
the requested items.</param>
+            /// <param name="error" type="Function">Error callback.</param>
+            /// <returns type="Object">Request object with an abort 
method./<param>
+
+            var queryOptions = "$skip=" + index + "&$top=" + count;
+            return queryForData(appendQueryOption(uri, queryOptions), 
that.options, success, error);
+        };
+
+        return that;
+    };
+
+    // DATAJS INTERNAL START
+    window.datajs.ODataCacheSource = ODataCacheSource;
+    // DATAJS INTERNAL END
+
+    // CONTENT END
 })(this);
\ No newline at end of file

Reply via email to