Skip to content

Commit 4889931

Browse files
committed
All IoC projects converted to VS2017 project and netstandard if available
1 parent 14fd409 commit 4889931

67 files changed

Lines changed: 355 additions & 1786 deletions

File tree

Some content is hidden

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

SharpRepository.AzureBlobRepository/AzureBlobRepositoryBase.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected void SetContainer()
4040

4141
if (CreateIfNotExists)
4242
{
43-
BlobContainer.CreateIfNotExists();
43+
BlobContainer.CreateIfNotExistsAsync();
4444
}
4545
}
4646

@@ -50,7 +50,7 @@ protected override T GetQuery(TKey key, IFetchStrategy<T> fetchStrategy)
5050
{
5151
var blob = BlobContainer.GetBlockBlobReference(key.ToString());
5252

53-
return blob == null ? null : JsonConvert.DeserializeObject<T>(blob.DownloadText());
53+
return blob == null ? null : JsonConvert.DeserializeObject<T>(blob.DownloadTextAsync().Result);
5454
}
5555
catch (StorageException storageException)
5656
{
@@ -72,8 +72,7 @@ protected override IQueryable<T> BaseQuery(IFetchStrategy<T> fetchStrategy = nul
7272

7373
protected virtual CloudBlockBlob GetBlobReference(T entity)
7474
{
75-
TKey key;
76-
GetPrimaryKey(entity, out key);
75+
GetPrimaryKey(entity, out TKey key);
7776

7877
return BlobContainer.GetBlockBlobReference(key.ToString());
7978
}
@@ -86,7 +85,7 @@ protected override void AddItem(T entity)
8685
protected override void DeleteItem(T entity)
8786
{
8887
var blob = GetBlobReference(entity);
89-
blob.DeleteIfExists();
88+
blob.DeleteIfExistsAsync();
9089
}
9190

9291
protected override void UpdateItem(T entity)
@@ -97,7 +96,7 @@ protected override void UpdateItem(T entity)
9796
protected virtual void AddOrUpdateItem(T entity)
9897
{
9998
var blob = GetBlobReference(entity);
100-
blob.UploadText(JsonConvert.SerializeObject(entity));
99+
blob.UploadTextAsync(JsonConvert.SerializeObject(entity));
101100
}
102101

103102
protected override void SaveChanges()

SharpRepository.AzureBlobRepository/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 24 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,33 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{F766CC4F-B69C-444C-A89F-01E2E8B172A8}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>SharpRepository.AzureBlobRepository</RootNamespace>
11-
<AssemblyName>SharpRepository.AzureBlobRepository</AssemblyName>
12-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
3+
<TargetFramework>netstandard1.5</TargetFramework>
4+
<Product>SharpRepository for AzureBlob</Product>
5+
<Authors>Ben Griswold, Jeff Treuting</Authors>
6+
<Description>SharpRepository is a generic repository</Description>
7+
<Summary>Written in C#, includes support for various relational, document and object databases including Entity Framework, RavenDB, MongoDB, CouchDB and Db4o. SharpRepository includes Xml and InMemory repository implementations as well. SharpRepository offers built-in caching options for AppFabric, memcached and the standard System.Runtime.Caching. SharpRepository also supports Specifications, FetchStrategies, Batches and Traits!</Summary>
8+
<PackageId>SharpRepository.AzureTableRepository</PackageId>
9+
<PackageVersion>2.0.0-alpha2</PackageVersion>
10+
<PackageReleaseNotes>2.0.0-alpha2: merge all code</PackageReleaseNotes>
11+
<PackageTags>SharpRepository Repository Azure Blob</PackageTags>
12+
<PackageIconUrl>https://user-images.githubusercontent.com/6349515/28491142-7b6350c4-6eeb-11e7-9c5b-e3b8ef1e73b8.png</PackageIconUrl>
13+
<PackageProjectUrl>https://github.com/SharpRepository/SharpRepository</PackageProjectUrl>
14+
<PackageLicenseUrl>https://raw.githubusercontent.com/SharpRepository/SharpRepository/master/license.txt</PackageLicenseUrl>
15+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
16+
<RepositoryUrl>https://github.com/SharpRepository/SharpRepository.git</RepositoryUrl>
17+
<RepositoryType>git</RepositoryType>
18+
<Version>2.0.0-alpha2</Version>
19+
<FileVersion>2.0.0.0</FileVersion>
20+
1521
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>full</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
24-
<Prefer32Bit>false</Prefer32Bit>
25-
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27-
<DebugType>pdbonly</DebugType>
28-
<Optimize>true</Optimize>
29-
<OutputPath>bin\Release\</OutputPath>
30-
<DefineConstants>TRACE</DefineConstants>
31-
<ErrorReport>prompt</ErrorReport>
32-
<WarningLevel>4</WarningLevel>
33-
<Prefer32Bit>false</Prefer32Bit>
34-
</PropertyGroup>
35-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
36-
<DebugSymbols>true</DebugSymbols>
37-
<OutputPath>bin\x64\Debug\</OutputPath>
38-
<DefineConstants>DEBUG;TRACE</DefineConstants>
39-
<DebugType>full</DebugType>
40-
<PlatformTarget>x64</PlatformTarget>
41-
<ErrorReport>prompt</ErrorReport>
42-
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
43-
</PropertyGroup>
44-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
45-
<OutputPath>bin\x64\Release\</OutputPath>
46-
<DefineConstants>TRACE</DefineConstants>
47-
<Optimize>true</Optimize>
48-
<DebugType>pdbonly</DebugType>
49-
<PlatformTarget>x64</PlatformTarget>
50-
<ErrorReport>prompt</ErrorReport>
51-
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
52-
</PropertyGroup>
53-
<ItemGroup>
54-
<Reference Include="System" />
55-
<Reference Include="System.Core" />
56-
<Reference Include="System.Data.Services.Client" />
57-
<Reference Include="System.Xml.Linq" />
58-
<Reference Include="System.Data.DataSetExtensions" />
59-
<Reference Include="Microsoft.CSharp" />
60-
<Reference Include="System.Data" />
61-
<Reference Include="System.Xml" />
62-
</ItemGroup>
6322
<ItemGroup>
64-
<Compile Include="AzureBlobRepository.cs" />
65-
<Compile Include="AzureBlobRepositoryBase.cs" />
66-
<Compile Include="AzureBlobConfigRepositoryFactory.cs" />
67-
<Compile Include="AzureBlobRepositoryConfiguration.cs" />
68-
<Compile Include="Properties\AssemblyInfo.cs" />
23+
<ProjectReference Include="..\SharpRepository.Repository\SharpRepository.Repository.csproj" />
6924
</ItemGroup>
7025
<ItemGroup>
71-
<ProjectReference Include="..\SharpRepository.Repository\SharpRepository.Repository.csproj">
72-
<Project>{710dee79-25ce-4f68-b8b1-d08a135ad154}</Project>
73-
<Name>SharpRepository.Repository</Name>
74-
</ProjectReference>
26+
<Folder Include="Properties\" />
27+
<Folder Include="Properties\" />
28+
<Folder Include="Properties\" />
7529
</ItemGroup>
7630
<ItemGroup>
77-
<None Include="app.config" />
78-
<None Include="project.json" />
79-
<None Include="SharpRepository.AzureBlobRepository.nuspec" />
31+
<PackageReference Include="WindowsAzure.Storage" Version="8.2.1" />
8032
</ItemGroup>
81-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
82-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
83-
Other similar extension points exist, see Microsoft.Common.targets.
84-
<Target Name="BeforeBuild">
85-
</Target>
86-
<Target Name="AfterBuild">
87-
</Target>
88-
-->
8933
</Project>

SharpRepository.AzureBlobRepository/SharpRepository.AzureBlobRepository.nuspec

Lines changed: 0 additions & 27 deletions
This file was deleted.

SharpRepository.AzureBlobRepository/app.config

Lines changed: 0 additions & 23 deletions
This file was deleted.

SharpRepository.AzureBlobRepository/project.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

SharpRepository.AzureDocumentDb/App.config

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,4 @@
88
<add key="DatabaseId" value="Entertainment" />
99
<add key="CollectionId" value="Games" />
1010
</appSettings>
11-
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup>
12-
<runtime>
13-
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
14-
<dependentAssembly>
15-
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
16-
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
17-
</dependentAssembly>
18-
</assemblyBinding>
19-
</runtime>
2011
</configuration>

SharpRepository.AzureDocumentDb/DocumentDbConfigRepositoryFactory.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Configuration;
32
using SharpRepository.Repository;
43
using SharpRepository.Repository.Configuration;
54

SharpRepository.AzureDocumentDb/DocumentDbRepository.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using Microsoft.Azure.Documents;
21
using SharpRepository.Repository.Caching;
32

43
namespace SharpRepository.AzureDocumentDb

SharpRepository.AzureDocumentDb/DocumentDbRepositoryBase.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@
33
using System.Linq.Expressions;
44
using System.Reflection;
55
using System.Text.RegularExpressions;
6-
using System.Threading.Tasks;
76
using Microsoft.Azure.Documents;
87
using Microsoft.Azure.Documents.Client;
9-
using Microsoft.Azure.Documents.Linq;
108
using Newtonsoft.Json;
11-
using Nito.AsyncEx.Synchronous;
129
using SharpRepository.Repository;
1310
using SharpRepository.Repository.Caching;
1411
using SharpRepository.Repository.FetchStrategies;
1512
using SharpRepository.Repository.Helpers;
1613
using SharpRepository.Repository.Specifications;
14+
using Nito.AsyncEx.Synchronous;
1715

1816
namespace SharpRepository.AzureDocumentDb
1917
{

0 commit comments

Comments
 (0)