- SL40 target in Rakefile was broken. Added back as experimental target.
- SL40 compilation error with SL40-specific code.
- Updated SilverlightLibraryPath in csproj files to point to Reference
  Assemblies rather than specific SL build/patch version.

Thanks to Martin Hollingsworth for these fixes
(http://groups.google.com/group/nsubstitute/msg/7d0f600804f87f0a)
This commit is contained in:
David Tchepak 2012-02-03 02:22:51 +11:00
Родитель 8446ebdcc6
Коммит cd89f90c8d
4 изменённых файлов: 17 добавлений и 7 удалений

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

@ -9,12 +9,17 @@ ZIP_EXE = File.expand_path "../ThirdParty/7z/7z.exe"
SOURCE_PATH = File.expand_path "../Source"
OUTPUT_PATH = File.expand_path "../Output"
#ALL_TARGETS = ["NET35", "NET40", "SL40"]
ALL_TARGETS = ["NET35", "NET40"]
EXPERIMENTAL_TARGETS = ["SL40"]
ENV["config"] = "Debug" if ENV["config"].nil?
ENV["target"] = ALL_TARGETS.first if ENV["target"].nil?
def get_targets()
return ALL_TARGETS if ENV["target"]=="ALL"
(ALL_TARGETS + EXPERIMENTAL_TARGETS).select { |x| ENV["target"].split(',').include? x }
end
CONFIG = ENV["config"]
TARGETS = ALL_TARGETS.select { |x| (ENV["target"].split(',').include? x) or ENV["target"]=="ALL" }
TARGETS = get_targets()
CLEAN.include(OUTPUT_PATH)

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

@ -246,7 +246,7 @@
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.CSharp.targets" Condition="$(MSBuildTargets) == 'Silverlight 4.0'" />
<Target Name="AfterBuild" Condition="$(MSBuildTargets) == 'Silverlight 4.0'">
<PropertyGroup>
<SilverlightLibraryPath>$(ProgramFiles32)\Microsoft Silverlight\4.0.60831.0</SilverlightLibraryPath>
<SilverlightLibraryPath>$(ProgramFiles32)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0</SilverlightLibraryPath>
</PropertyGroup>
<Message Text="Pulling in assemblies from $(SilverlightLibraryPath)" />
<ItemGroup>
@ -258,4 +258,4 @@
</ItemGroup>
<Copy SourceFiles="@(Dependencies)" DestinationFolder="$(OutputPath)" />
</Target>
</Project>
</Project>

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

@ -300,7 +300,7 @@
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.CSharp.targets" Condition="$(MSBuildTargets) == 'Silverlight 4.0'" />
<Target Name="AfterBuild" Condition="$(MSBuildTargets) == 'Silverlight 4.0'">
<PropertyGroup>
<SilverlightLibraryPath>$(ProgramFiles32)\Microsoft Silverlight\4.0.60831.0</SilverlightLibraryPath>
<SilverlightLibraryPath>$(ProgramFiles32)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0</SilverlightLibraryPath>
</PropertyGroup>
<Message Text="Pulling in assemblies from $(SilverlightLibraryPath)" />
<ItemGroup>
@ -312,4 +312,4 @@
</ItemGroup>
<Copy SourceFiles="@(Dependencies)" DestinationFolder="$(OutputPath)" />
</Target>
</Project>
</Project>

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

@ -56,7 +56,12 @@ namespace NSubstitute.Core
return true;
}
public T[] ToArray() { LockedAction(() => _stack.ToArray()); }
public T[] ToArray()
{
T[] array = null;
LockedAction(() => array = _stack.ToArray());
return array;
}
private void LockedAction(Action action)
{