Skip to content

Commit 02c12b6

Browse files
committed
Merge branch '2.x' into feature/export-framework
Conflicts: src/Presentation/SmartStore.Web.Framework/DependencyRegistrar.cs src/Presentation/SmartStore.Web.Framework/Settings/StoreDependingSettingHelper.cs
2 parents f9f1e4e + 64cf359 commit 02c12b6

65 files changed

Lines changed: 972 additions & 575 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.

SmartStoreNET.Tasks.Targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
33

44
<!-- General -->
5-
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.Tasks.dll"/>
5+
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.Tasks.dll"/>
66

77
<!-- Initialization -->
88

build.bat

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
set MSBuildPath=%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
1+
FOR %%b in (
2+
"%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"
3+
"%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
4+
"%ProgramFiles%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
25

3-
@IF NOT EXIST %MSBuildPath% @ECHO COULDN'T FIND MSBUILD: %MSBuildPath% (Is .NET 4 installed?)
4-
ELSE GOTO END
6+
"%VS120COMNTOOLS%..\..\VC\vcvarsall.bat"
7+
"%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
8+
"%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
9+
) do (
10+
if exist %%b (
11+
call %%b x86
12+
goto build
13+
)
14+
)
15+
16+
echo "Unable to detect suitable environment. Build may not succeed."
517

6-
:CheckOS
7-
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
18+
:build
819

9-
:64BIT
10-
echo 64-bit...
11-
set MSBuildPath="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
12-
GOTO END
13-
14-
:32BIT
15-
echo 32-bit...
16-
set MSBuildPath="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
17-
GOTO END
18-
19-
:END
20-
21-
%MSBuildPath% SmartStoreNET.proj /p:DebugSymbols=false /p:DebugType=None /P:SlnName=SmartStoreNET /maxcpucount %*
20+
msbuild SmartStoreNET.proj /p:DebugSymbols=false /p:DebugType=None /P:SlnName=SmartStoreNET /maxcpucount %*

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
* #62 free shipping info on product detail page
5252
* Display base price in CompactProductBox
5353
* Automatically redirect to referrer after login
54+
* #826 Image gallery: the viewport height was fixed to 300 px, but now respects MediaSettings > ImageSize.
5455
* #249 Make UI editor for 'SeoSettings.ExtraRobotsDisallows'
5556
* Debitoor: Customer VAT number not transmitted anymore because it appears on the Debitoor invoice.
5657
* #778 Web-API: Increase MaxExpansionDepth for using expand pathes
@@ -59,6 +60,7 @@
5960
* #791 Preselected attributes or attribute combinations should always be appended as querystring to product page links
6061
* Simplified handling of SEO names
6162
* URLs are not converted to lower case anymore
63+
* Product grid sortable by name, price and created on
6264

6365
### Bugfixes
6466
* #523 Redirecting to payment provider performed by core instead of plugin
@@ -74,6 +76,7 @@
7476
* #755 Some methods still loading all products in one go
7577
* #796 Selected specification in product filter mask is displayed with default language (not localized)
7678
* #805 Product filter is reset if 'product sorting' or 'view mode' or 'amount of displayed products per page' is changed
79+
* Hide link to a topic page if it is limited to stores
7780

7881

7982
## SmartStore.NET 2.2.2

src/Libraries/SmartStore.Core/Utilities/Reflection/FastActivator.cs renamed to src/Libraries/SmartStore.Core/ComponentModel/FastActivator.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
using System.Text;
54
using System.Reflection;
6-
using System.Threading.Tasks;
75
using System.Linq.Expressions;
86
using System.Collections.Concurrent;
97

10-
namespace SmartStore.Utilities.Reflection
8+
namespace SmartStore.ComponentModel
119
{
1210
public class FastActivator
1311
{

src/Libraries/SmartStore.Core/Utilities/Reflection/FastProperty.cs renamed to src/Libraries/SmartStore.Core/ComponentModel/FastProperty.cs

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
using System.Linq.Expressions;
1010
using System.Reflection;
1111

12-
namespace SmartStore.Utilities.Reflection
12+
namespace SmartStore.ComponentModel
1313
{
1414
public enum PropertyCachingStrategy
1515
{
1616
/// <summary>
1717
/// Don't cache FastProperty instances
1818
/// </summary>
19-
Uncached,
19+
Uncached = 0,
2020
/// <summary>
2121
/// Always cache FastProperty instances
2222
/// </summary>
23-
Cached,
23+
Cached = 1,
2424
/// <summary>
2525
/// Always cache FastProperty instances. PLUS cache all other properties of the declaring type.
2626
/// </summary>
27-
EagerCached
27+
EagerCached = 2
2828
}
2929

3030
public class FastProperty
@@ -85,7 +85,7 @@ public bool IsPublicSettable
8585
_isPublicSettable = Property.CanWrite && Property.GetSetMethod(false) != null;
8686
}
8787
return _isPublicSettable.Value;
88-
}
88+
}
8989
}
9090

9191
public bool IsSequenceType
@@ -125,7 +125,7 @@ public Action<object, object> ValueSetter
125125
public object GetValue(object instance)
126126
{
127127
return ValueGetter(instance);
128-
}
128+
}
129129

130130
/// <summary>
131131
/// Sets the property value for the specified <paramref name="instance" />.
@@ -208,16 +208,15 @@ public static IReadOnlyDictionary<string, FastProperty> GetVisibleProperties(Typ
208208
}
209209

210210
public static FastProperty GetProperty<T>(
211-
T type,
212-
Expression<Func<T, object>> property,
211+
Expression<Func<T, object>> property,
213212
PropertyCachingStrategy cachingStrategy = PropertyCachingStrategy.Cached)
214213
{
215-
return GetProperty(typeof(T), property.ExtractPropertyInfo(), cachingStrategy);
214+
return GetProperty(property.ExtractPropertyInfo(), cachingStrategy);
216215
}
217216

218217
public static FastProperty GetProperty(
219-
Type type,
220-
string propertyName,
218+
Type type,
219+
string propertyName,
221220
PropertyCachingStrategy cachingStrategy = PropertyCachingStrategy.Cached)
222221
{
223222
Guard.ArgumentNotNull(() => type);
@@ -233,7 +232,7 @@ public static FastProperty GetProperty(
233232
var key = new PropertyKey(type, propertyName);
234233
if (!_singlePropertiesCache.TryGetValue(key, out fastProperty))
235234
{
236-
var pi = type.GetProperty(propertyName, BindingFlags.GetProperty | BindingFlags.IgnoreCase);
235+
var pi = type.GetProperty(propertyName, BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance | BindingFlags.IgnoreCase);
237236
if (pi != null)
238237
{
239238
fastProperty = CreateInstance(pi);
@@ -248,21 +247,19 @@ public static FastProperty GetProperty(
248247
}
249248

250249
public static FastProperty GetProperty(
251-
Type type,
252250
PropertyInfo propertyInfo,
253251
PropertyCachingStrategy cachingStrategy = PropertyCachingStrategy.Cached)
254252
{
255-
Guard.ArgumentNotNull(() => type);
256253
Guard.ArgumentNotNull(() => propertyInfo);
257254

258255
FastProperty fastProperty = null;
259256

260-
if (TryGetCachedProperty(type, propertyInfo.Name, cachingStrategy == PropertyCachingStrategy.EagerCached, out fastProperty))
257+
if (TryGetCachedProperty(propertyInfo.ReflectedType, propertyInfo.Name, cachingStrategy == PropertyCachingStrategy.EagerCached, out fastProperty))
261258
{
262259
return fastProperty;
263260
}
264261

265-
var key = new PropertyKey(type, propertyInfo.Name);
262+
var key = new PropertyKey(propertyInfo.ReflectedType, propertyInfo.Name);
266263
if (!_singlePropertiesCache.TryGetValue(key, out fastProperty))
267264
{
268265
fastProperty = CreateInstance(propertyInfo);
@@ -588,11 +585,11 @@ protected static IDictionary<string, FastProperty> GetVisibleProperties(
588585
break;
589586
}
590587

591-
if (currentTypeInfo.BaseType != null)
588+
if (currentTypeInfo.BaseType != null)
592589
{
593590
currentTypeInfo = currentTypeInfo.BaseType.GetTypeInfo();
594591
}
595-
592+
596593
}
597594

598595
if (!ignoreProperty)
@@ -619,7 +616,7 @@ protected static IDictionary<string, FastProperty> GetProperties(
619616
if (!cache.TryGetValue(type, out fastProperties))
620617
{
621618
var candidates = GetCandidateProperties(type);
622-
fastProperties = candidates.Select(p => createPropertyHelper(p)).ToDictionary(x => x.Name, StringComparer.OrdinalIgnoreCase);
619+
fastProperties = candidates.Select(p => createPropertyHelper(p)).ToDictionary(x => x.Name, StringComparer.OrdinalIgnoreCase);
623620
cache.TryAdd(type, fastProperties);
624621
}
625622

src/Libraries/SmartStore.Core/ComponentModel/HybridExpando.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
using System.Dynamic;
3838
using System.Reflection;
3939
using System.Collections;
40-
using SmartStore.Utilities.Reflection;
4140

4241
namespace SmartStore.ComponentModel
4342
{

src/Libraries/SmartStore.Core/Infrastructure/ComparableObject.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
using System.Linq;
44
using System.Linq.Expressions;
55
using System.Reflection;
6-
using System.ComponentModel;
7-
using SmartStore.Utilities.Reflection;
86
using SmartStore.Utilities;
97
using System.Collections.Concurrent;
8+
using SmartStore.ComponentModel;
109

1110
namespace SmartStore
1211
{

src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/ContainerManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
using System.Reflection;
66
using Autofac;
77
using Autofac.Builder;
8+
using SmartStore.ComponentModel;
89
using SmartStore.Core.Caching;
9-
using SmartStore.Utilities.Reflection;
1010

1111
namespace SmartStore.Core.Infrastructure.DependencyManagement
1212
{

src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/DefaultLifetimeScopeAccessor.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ public ILifetimeScope GetLifetimeScope(Action<ContainerBuilder> configurationAct
7171
return scope;
7272
}
7373

74-
private void OnScopeBeginning(object sender, LifetimeScopeBeginningEventArgs args)
75-
{
76-
bool isWeb = System.Web.HttpContext.Current != null;
77-
Debug.WriteLine("Scope Begin, Web: " + isWeb);
78-
}
74+
//private void OnScopeBeginning(object sender, LifetimeScopeBeginningEventArgs args)
75+
//{
76+
// bool isWeb = System.Web.HttpContext.Current != null;
77+
// Debug.WriteLine("Scope Begin, Web: " + isWeb);
78+
//}
7979

80-
private void OnScopeEnding(object sender, LifetimeScopeEndingEventArgs args)
81-
{
82-
bool isWeb = System.Web.HttpContext.Current != null;
83-
Debug.WriteLine("Scope END, Web: " + isWeb);
84-
}
80+
//private void OnScopeEnding(object sender, LifetimeScopeEndingEventArgs args)
81+
//{
82+
// bool isWeb = System.Web.HttpContext.Current != null;
83+
// Debug.WriteLine("Scope END, Web: " + isWeb);
84+
//}
8585

8686
private ILifetimeScope BeginLifetimeScope(Action<ContainerBuilder> configurationAction)
8787
{

src/Libraries/SmartStore.Core/SmartStore.Core.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,11 @@
568568
<Compile Include="Utilities\ObjectDumper.cs" />
569569
<Compile Include="Utilities\Prettifier.cs" />
570570
<Compile Include="Utilities\Range.cs" />
571-
<Compile Include="Utilities\Reflection\FastActivator.cs" />
571+
<Compile Include="ComponentModel\FastActivator.cs" />
572572
<Compile Include="Utilities\SeoHelper.cs" />
573573
<Compile Include="Utilities\SmartSyndicationFeed.cs" />
574574
<Compile Include="Utilities\StringTokenizer.cs" />
575-
<Compile Include="Utilities\Reflection\FastProperty.cs" />
575+
<Compile Include="ComponentModel\FastProperty.cs" />
576576
<Compile Include="Utilities\Threading\LockExtensions.cs" />
577577
<Compile Include="Utilities\Threading\ReadLockDisposable.cs" />
578578
<Compile Include="Utilities\Threading\UpgradeableReadLockDisposable.cs" />

0 commit comments

Comments
 (0)