Added XNA 4.0 XBox 360 project; fixed compilation errors that would result from compiling Nuclex.Support on the XBox 360's special compact framework
git-svn-id: file:///srv/devel/repo-conversion/nusu@202 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
5f5b8b519b
commit
1aad371ece
|
@ -18,7 +18,7 @@
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\xna-3.1-xbox360\Debug\</OutputPath>
|
<OutputPath>bin\xna-3.1-xbox360\Debug\</OutputPath>
|
||||||
<DefineConstants>TRACE;DEBUG;XBOX;XBOX360;NO_SERIALIZATION</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;XBOX;XBOX360;NO_SERIALIZATION;XNA_3</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\xna-3.1-xbox360\Release\</OutputPath>
|
<OutputPath>bin\xna-3.1-xbox360\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE;XBOX;XBOX360;NO_SERIALIZATION</DefineConstants>
|
<DefineConstants>TRACE;XBOX;XBOX360;NO_SERIALIZATION;XNA_3</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
|
|
423
Nuclex.Support (xna-4.0-xbox360).csproj
Normal file
423
Nuclex.Support (xna-4.0-xbox360).csproj
Normal file
|
@ -0,0 +1,423 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectGuid>{DCB169D9-417F-4FF1-848A-B00CF7C88B31}</ProjectGuid>
|
||||||
|
<ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">Xbox 360</Platform>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>Nuclex.Support</RootNamespace>
|
||||||
|
<AssemblyName>Nuclex.Support</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
|
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||||
|
<XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
|
||||||
|
<XnaPlatform>Xbox 360</XnaPlatform>
|
||||||
|
<XnaProfile>HiDef</XnaProfile>
|
||||||
|
<XnaCrossPlatformGroupID>228353e9-b10a-4191-b7a5-f7c152bfb818</XnaCrossPlatformGroupID>
|
||||||
|
<XnaOutputType>Library</XnaOutputType>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Xbox 360' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\xna-4.0-xbox360\Debug\</OutputPath>
|
||||||
|
<DefineConstants>TRACE;DEBUG;XBOX;XBOX360;NO_CLONING;NO_SERIALIZATION;NO_XMLDOCUMENT</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<NoStdLib>true</NoStdLib>
|
||||||
|
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||||
|
<XnaCompressContent>true</XnaCompressContent>
|
||||||
|
<DocumentationFile>bin\xna-4.0-xbox360\Debug\Nuclex.Support.xml</DocumentationFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Xbox 360' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\xna-4.0-xbox360\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE;XBOX;XBOX360;NO_CLONING;NO_SERIALIZATION;NO_XMLDOCUMENT</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<NoStdLib>true</NoStdLib>
|
||||||
|
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||||
|
<XnaCompressContent>true</XnaCompressContent>
|
||||||
|
<DocumentationFile>bin\xna-4.0-xbox360\Release\Nuclex.Support.xml</DocumentationFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework.Game">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework.Graphics">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework.GamerServices">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework.Xact">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework.Video">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework.Avatar">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework.Net">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework.Storage">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="mscorlib">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Core">
|
||||||
|
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml.Linq">
|
||||||
|
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Net">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Source\AffineThreadPool.Test.cs">
|
||||||
|
<DependentUpon>AffineThreadPool.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\Deque.cs" />
|
||||||
|
<Compile Include="Source\Collections\Deque.Insertion.cs">
|
||||||
|
<DependentUpon>Deque.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\Deque.Interfaces.cs">
|
||||||
|
<DependentUpon>Deque.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\Deque.Removal.cs">
|
||||||
|
<DependentUpon>Deque.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\Deque.Search.cs">
|
||||||
|
<DependentUpon>Deque.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\Deque.Test.cs">
|
||||||
|
<DependentUpon>Deque.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\IObservableCollection.cs" />
|
||||||
|
<Compile Include="Source\Collections\IRecyclable.cs" />
|
||||||
|
<Compile Include="Source\Collections\ItemEventArgs.cs" />
|
||||||
|
<Compile Include="Source\Collections\ItemEventArgs.Test.cs">
|
||||||
|
<DependentUpon>ItemEventArgs.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\ObservableCollection.cs" />
|
||||||
|
<Compile Include="Source\Collections\ObservableCollection.Test.cs">
|
||||||
|
<DependentUpon>ObservableCollection.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\ObservableDictionary.cs" />
|
||||||
|
<Compile Include="Source\Collections\ObservableDictionary.Test.cs">
|
||||||
|
<DependentUpon>ObservableDictionary.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\PairPriorityQueue.cs" />
|
||||||
|
<Compile Include="Source\Collections\PairPriorityQueue.Test.cs">
|
||||||
|
<DependentUpon>PairPriorityQueue.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\Parentable.cs" />
|
||||||
|
<Compile Include="Source\Collections\Parentable.Test.cs">
|
||||||
|
<DependentUpon>Parentable.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\ParentingCollection.cs" />
|
||||||
|
<Compile Include="Source\Collections\ParentingCollection.Test.cs">
|
||||||
|
<DependentUpon>ParentingCollection.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\Pool.cs" />
|
||||||
|
<Compile Include="Source\Collections\Pool.Test.cs">
|
||||||
|
<DependentUpon>Pool.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\PriorityItemPair.cs" />
|
||||||
|
<Compile Include="Source\Collections\PriorityItemPair.Test.cs">
|
||||||
|
<DependentUpon>PriorityItemPair.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\PriorityQueue.cs" />
|
||||||
|
<Compile Include="Source\Collections\PriorityQueue.Test.cs">
|
||||||
|
<DependentUpon>PriorityQueue.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\ReadOnlyCollection.cs" />
|
||||||
|
<Compile Include="Source\Collections\ReadOnlyCollection.Test.cs">
|
||||||
|
<DependentUpon>ReadOnlyCollection.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\ReadOnlyDictionary.cs" />
|
||||||
|
<Compile Include="Source\Collections\ReadOnlyDictionary.Test.cs">
|
||||||
|
<DependentUpon>ReadOnlyDictionary.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\ReadOnlyList.cs" />
|
||||||
|
<Compile Include="Source\Collections\ReadOnlyList.Test.cs">
|
||||||
|
<DependentUpon>ReadOnlyList.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\ReverseComparer.cs" />
|
||||||
|
<Compile Include="Source\Collections\ReverseComparer.Test.cs">
|
||||||
|
<DependentUpon>ReverseComparer.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\AffineThreadPool.cs" />
|
||||||
|
<Compile Include="Source\EnumHelper.cs" />
|
||||||
|
<Compile Include="Source\EnumHelper.Test.cs">
|
||||||
|
<DependentUpon>EnumHelper.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Plugins\PrototypeFactory.cs" />
|
||||||
|
<Compile Include="Source\Plugins\PrototypeFactory.Test.cs">
|
||||||
|
<DependentUpon>PrototypeFactory.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Scheduling\GenericTimeSource.Test.cs">
|
||||||
|
<DependentUpon>GenericTimeSource.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Scheduling\ISchedulerService.cs" />
|
||||||
|
<Compile Include="Source\Scheduling\ITimeSource.cs" />
|
||||||
|
<Compile Include="Source\Scheduling\Scheduler.cs" />
|
||||||
|
<Compile Include="Source\Scheduling\GenericTimeSource.cs" />
|
||||||
|
<Compile Include="Source\Scheduling\Scheduler.Test.cs">
|
||||||
|
<DependentUpon>Scheduler.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Scheduling\Scheduler.TimeSource.cs">
|
||||||
|
<DependentUpon>Scheduler.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Scheduling\WindowsTimeSource.cs" />
|
||||||
|
<Compile Include="Source\Scheduling\WindowsTimeSource.Test.cs">
|
||||||
|
<DependentUpon>WindowsTimeSource.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Semaphore.cs" />
|
||||||
|
<Compile Include="Source\Semaphore.Test.cs">
|
||||||
|
<DependentUpon>Semaphore.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Services\AppDomainTypeLister.cs" />
|
||||||
|
<Compile Include="Source\Services\AppDomainTypeLister.Test.cs">
|
||||||
|
<DependentUpon>AppDomainTypeLister.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Services\MultiAssemblyTypeLister.cs" />
|
||||||
|
<Compile Include="Source\Services\ExplicitTypeLister.Test.cs">
|
||||||
|
<DependentUpon>ExplicitTypeLister.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Services\Instancing.cs" />
|
||||||
|
<Compile Include="Source\Services\ITypeLister.cs" />
|
||||||
|
<Compile Include="Source\Services\MultiAssemblyTypeLister.Test.cs">
|
||||||
|
<DependentUpon>MultiAssemblyTypeLister.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Services\ProgressTracking\IProgressPublishingService.cs" />
|
||||||
|
<Compile Include="Source\Services\ProgressTracking\IProgressCollectingService.cs" />
|
||||||
|
<Compile Include="Source\Services\ProgressTracking\ITrackedProcess.cs" />
|
||||||
|
<Compile Include="Source\Services\ProgressTracking\ProgressTrackingComponent.cs" />
|
||||||
|
<Compile Include="Source\Services\RepositoryTypeLister.cs" />
|
||||||
|
<Compile Include="Source\Services\RepositoryTypeLister.Test.cs">
|
||||||
|
<DependentUpon>RepositoryTypeLister.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Services\ServiceManager.Analyzer.cs">
|
||||||
|
<DependentUpon>ServiceManager.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Services\ServiceManager.cs" />
|
||||||
|
<Compile Include="Source\Services\ServiceManager.For.cs">
|
||||||
|
<DependentUpon>ServiceManager.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\IO\PartialStream.cs" />
|
||||||
|
<Compile Include="Source\IO\PartialStream.Test.cs">
|
||||||
|
<DependentUpon>PartialStream.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\IO\RingMemoryStream.cs" />
|
||||||
|
<Compile Include="Source\IO\RingMemoryStream.Test.cs">
|
||||||
|
<DependentUpon>RingMemoryStream.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\TransformingReadOnlyCollection.cs" />
|
||||||
|
<Compile Include="Source\Collections\TransformingReadOnlyCollection.Interfaces.cs">
|
||||||
|
<DependentUpon>TransformingReadOnlyCollection.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\TransformingReadOnlyCollection.Test.cs">
|
||||||
|
<DependentUpon>TransformingReadOnlyCollection.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\WeakCollection.cs" />
|
||||||
|
<Compile Include="Source\Collections\WeakCollection.Interfaces.cs">
|
||||||
|
<DependentUpon>WeakCollection.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Collections\WeakCollection.Test.cs">
|
||||||
|
<DependentUpon>WeakCollection.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\FloatHelper.cs" />
|
||||||
|
<Compile Include="Source\FloatHelper.Test.cs">
|
||||||
|
<DependentUpon>FloatHelper.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\IntegerHelper.cs" />
|
||||||
|
<Compile Include="Source\IntegerHelper.Test.cs">
|
||||||
|
<DependentUpon>IntegerHelper.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Licensing\LicenseKey.cs" />
|
||||||
|
<Compile Include="Source\Licensing\LicenseKey.Test.cs">
|
||||||
|
<DependentUpon>LicenseKey.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Parsing\CommandLine.Argument.cs">
|
||||||
|
<DependentUpon>CommandLine.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Parsing\CommandLine.Formatter.cs">
|
||||||
|
<DependentUpon>CommandLine.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Parsing\CommandLine.Test.cs">
|
||||||
|
<DependentUpon>CommandLine.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Parsing\CommandLine.cs" />
|
||||||
|
<Compile Include="Source\Parsing\CommandLine.Parser.cs">
|
||||||
|
<DependentUpon>CommandLine.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\PathHelper.cs" />
|
||||||
|
<Compile Include="Source\PathHelper.Test.cs">
|
||||||
|
<DependentUpon>PathHelper.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Plugins\AssemblyLoadEventArgs.cs" />
|
||||||
|
<Compile Include="Source\Plugins\AssemblyLoadEventArgs.Test.cs">
|
||||||
|
<DependentUpon>AssemblyLoadEventArgs.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Plugins\IAbstractFactory.cs" />
|
||||||
|
<Compile Include="Source\Plugins\Employer.Test.cs">
|
||||||
|
<DependentUpon>Employer.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Plugins\FactoryEmployer.Test.cs">
|
||||||
|
<DependentUpon>FactoryEmployer.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Plugins\IAssemblyLoader.cs" />
|
||||||
|
<Compile Include="Source\Plugins\InstanceEmployer.Test.cs">
|
||||||
|
<DependentUpon>InstanceEmployer.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Plugins\NoPluginAttribute.cs" />
|
||||||
|
<Compile Include="Source\Plugins\Employer.cs" />
|
||||||
|
<Compile Include="Source\Plugins\FactoryEmployer.cs" />
|
||||||
|
<Compile Include="Source\Plugins\InstanceEmployer.cs" />
|
||||||
|
<Compile Include="Source\Plugins\NoPluginAttribute.Test.cs">
|
||||||
|
<DependentUpon>NoPluginAttribute.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Plugins\PluginHelper.cs" />
|
||||||
|
<Compile Include="Source\Plugins\PluginHelper.Test.cs">
|
||||||
|
<DependentUpon>PluginHelper.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Plugins\PluginHost.cs" />
|
||||||
|
<Compile Include="Source\Plugins\PluginHost.Test.cs">
|
||||||
|
<DependentUpon>PluginHost.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Plugins\PluginRepository.cs" />
|
||||||
|
<Compile Include="Source\Plugins\PluginRepository.Test.cs">
|
||||||
|
<DependentUpon>PluginRepository.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Scheduling\AbortedException.cs" />
|
||||||
|
<Compile Include="Source\Scheduling\AbortedException.Test.cs">
|
||||||
|
<DependentUpon>AbortedException.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Scheduling\IAbortable.cs" />
|
||||||
|
<Compile Include="Source\Scheduling\Operation.cs" />
|
||||||
|
<Compile Include="Source\Scheduling\Operation.Test.cs">
|
||||||
|
<DependentUpon>Operation.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Scheduling\OperationQueue.cs" />
|
||||||
|
<Compile Include="Source\Scheduling\OperationQueue.Test.cs">
|
||||||
|
<DependentUpon>OperationQueue.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Scheduling\ThreadCallbackOperation.cs" />
|
||||||
|
<Compile Include="Source\Scheduling\ThreadCallbackOperation.Test.cs">
|
||||||
|
<DependentUpon>ThreadCallbackOperation.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Scheduling\ThreadOperation.cs" />
|
||||||
|
<Compile Include="Source\Scheduling\ThreadOperation.Test.cs">
|
||||||
|
<DependentUpon>ThreadOperation.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Services\ServiceManager.Test.cs">
|
||||||
|
<DependentUpon>ServiceManager.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Services\ExplicitTypeLister.cs" />
|
||||||
|
<Compile Include="Source\Shared.cs" />
|
||||||
|
<Compile Include="Source\Shared.Test.cs">
|
||||||
|
<DependentUpon>Shared.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\IO\ChainStream.cs" />
|
||||||
|
<Compile Include="Source\IO\ChainStream.Test.cs">
|
||||||
|
<DependentUpon>ChainStream.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\StringBuilderHelper.cs" />
|
||||||
|
<Compile Include="Source\StringBuilderHelper.Test.cs">
|
||||||
|
<DependentUpon>StringBuilderHelper.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\StringHelper.cs" />
|
||||||
|
<Compile Include="Source\StringHelper.Test.cs">
|
||||||
|
<DependentUpon>StringHelper.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\StringSegment.cs" />
|
||||||
|
<Compile Include="Source\StringSegment.Test.cs">
|
||||||
|
<DependentUpon>StringSegment.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Tracking\IdleStateEventArgs.cs" />
|
||||||
|
<Compile Include="Source\Tracking\IdleStateEventArgs.Test.cs">
|
||||||
|
<DependentUpon>IdleStateEventArgs.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Tracking\Internal\ObservedWeightedTransaction.cs" />
|
||||||
|
<Compile Include="Source\Tracking\Internal\ObservedWeightedTransaction.Test.cs">
|
||||||
|
<DependentUpon>ObservedWeightedTransaction.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Tracking\Internal\WeightedTransactionWrapperCollection.cs" />
|
||||||
|
<Compile Include="Source\Tracking\Internal\WeightedTransactionWrapperCollection.Test.cs">
|
||||||
|
<DependentUpon>WeightedTransactionWrapperCollection.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Tracking\IProgressReporter.cs" />
|
||||||
|
<Compile Include="Source\Tracking\IStatusReporter.cs" />
|
||||||
|
<Compile Include="Source\Tracking\ProgressReportEventArgs.cs" />
|
||||||
|
<Compile Include="Source\Tracking\ProgressReportEventArgs.Test.cs">
|
||||||
|
<DependentUpon>ProgressReportEventArgs.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Tracking\ProgressTracker.cs" />
|
||||||
|
<Compile Include="Source\Tracking\ProgressTracker.Test.cs">
|
||||||
|
<DependentUpon>ProgressTracker.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Tracking\Request.cs" />
|
||||||
|
<Compile Include="Source\Tracking\Request.Test.cs">
|
||||||
|
<DependentUpon>Request.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Tracking\StatusReportEventArgs.Test.cs">
|
||||||
|
<DependentUpon>StatusReportEventArgs.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Tracking\Transaction.Test.cs">
|
||||||
|
<DependentUpon>Transaction.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Tracking\TransactionGroup.cs" />
|
||||||
|
<Compile Include="Source\Tracking\TransactionGroup.Test.cs">
|
||||||
|
<DependentUpon>TransactionGroup.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\Tracking\StatusReportEventArgs.cs" />
|
||||||
|
<Compile Include="Source\Tracking\Transaction.cs" />
|
||||||
|
<Compile Include="Source\Tracking\WeightedTransaction.cs" />
|
||||||
|
<Compile Include="Source\Tracking\WeightedTransaction.Test.cs">
|
||||||
|
<DependentUpon>WeightedTransaction.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\WeakReference.cs" />
|
||||||
|
<Compile Include="Source\WeakReference.Test.cs">
|
||||||
|
<DependentUpon>WeakReference.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Source\XmlHelper.cs" />
|
||||||
|
<Compile Include="Source\XmlHelper.Test.cs">
|
||||||
|
<DependentUpon>XmlHelper.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Documents\CommandLine.txt" />
|
||||||
|
<Content Include="Documents\Nuclex.Support.txt" />
|
||||||
|
<Content Include="Documents\Request Framework.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />
|
||||||
|
<!--
|
||||||
|
To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
|
@ -29,7 +29,9 @@ namespace Nuclex.Support.Collections {
|
||||||
/// <summary>A dictionary that sneds out change notifications</summary>
|
/// <summary>A dictionary that sneds out change notifications</summary>
|
||||||
/// <typeparam name="KeyType">Type of the keys used in the dictionary</typeparam>
|
/// <typeparam name="KeyType">Type of the keys used in the dictionary</typeparam>
|
||||||
/// <typeparam name="ValueType">Type of the values used in the dictionary</typeparam>
|
/// <typeparam name="ValueType">Type of the values used in the dictionary</typeparam>
|
||||||
|
#if !NO_SERIALIZATION
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
#endif
|
||||||
public class ObservableDictionary<KeyType, ValueType> :
|
public class ObservableDictionary<KeyType, ValueType> :
|
||||||
#if !NO_SERIALIZATION
|
#if !NO_SERIALIZATION
|
||||||
ISerializable,
|
ISerializable,
|
||||||
|
|
|
@ -29,7 +29,9 @@ namespace Nuclex.Support.Collections {
|
||||||
/// <summary>Wraps a dictionary and prevents users from modifying it</summary>
|
/// <summary>Wraps a dictionary and prevents users from modifying it</summary>
|
||||||
/// <typeparam name="KeyType">Type of the keys used in the dictionary</typeparam>
|
/// <typeparam name="KeyType">Type of the keys used in the dictionary</typeparam>
|
||||||
/// <typeparam name="ValueType">Type of the values used in the dictionary</typeparam>
|
/// <typeparam name="ValueType">Type of the values used in the dictionary</typeparam>
|
||||||
|
#if !NO_SERIALIZATION
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
#endif
|
||||||
public class ReadOnlyDictionary<KeyType, ValueType> :
|
public class ReadOnlyDictionary<KeyType, ValueType> :
|
||||||
#if !NO_SERIALIZATION
|
#if !NO_SERIALIZATION
|
||||||
ISerializable,
|
ISerializable,
|
||||||
|
|
|
@ -98,7 +98,7 @@ namespace Nuclex.Support.Plugins {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception exception) {
|
catch(Exception exception) {
|
||||||
Trace.WriteLine("Could not employ " + type.ToString() + ": " + exception.Message);
|
reportError("Could not employ " + type.ToString() + ": " + exception.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,6 +118,14 @@ namespace Nuclex.Support.Plugins {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>Reports an error to the debugging console</summary>
|
||||||
|
/// <param name="error">Error message that will be reported</param>
|
||||||
|
private static void reportError(string error) {
|
||||||
|
#if !XBOX360
|
||||||
|
Trace.WriteLine(error);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Employs and manages types in the loaded plugin assemblies</summary>
|
/// <summary>Employs and manages types in the loaded plugin assemblies</summary>
|
||||||
private Employer employer;
|
private Employer employer;
|
||||||
/// <summary>Repository containing all plugins loaded, shared with other hosts</summary>
|
/// <summary>Repository containing all plugins loaded, shared with other hosts</summary>
|
||||||
|
|
|
@ -78,7 +78,7 @@ namespace Nuclex.Support.Plugins {
|
||||||
// Unauthorized acccess - Either the assembly is not trusted because it contains
|
// Unauthorized acccess - Either the assembly is not trusted because it contains
|
||||||
// code that imposes a security risk on the system or a user rights problem
|
// code that imposes a security risk on the system or a user rights problem
|
||||||
catch(UnauthorizedAccessException) {
|
catch(UnauthorizedAccessException) {
|
||||||
Trace.WriteLine(
|
reportError(
|
||||||
"Not authorized to load assembly '" + path + "', " +
|
"Not authorized to load assembly '" + path + "', " +
|
||||||
"possible rights problem"
|
"possible rights problem"
|
||||||
);
|
);
|
||||||
|
@ -86,14 +86,14 @@ namespace Nuclex.Support.Plugins {
|
||||||
// Bad image format - This exception is often thrown when the assembly we
|
// Bad image format - This exception is often thrown when the assembly we
|
||||||
// attempted to load requires a different version of the .NET framework
|
// attempted to load requires a different version of the .NET framework
|
||||||
catch(BadImageFormatException) {
|
catch(BadImageFormatException) {
|
||||||
Trace.WriteLine(
|
reportError(
|
||||||
"'" + path + "' is not a .NET assembly, requires a different version " +
|
"'" + path + "' is not a .NET assembly, requires a different version " +
|
||||||
"of the .NET Runtime or does not support the current instruction set (x86/x64)"
|
"of the .NET Runtime or does not support the current instruction set (x86/x64)"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// Unknown error - Our last resort is to show a default error message
|
// Unknown error - Our last resort is to show a default error message
|
||||||
catch(Exception exception) {
|
catch(Exception exception) {
|
||||||
Trace.WriteLine(
|
reportError(
|
||||||
"Failed to load plugin assembly '" + path + "': " + exception.Message
|
"Failed to load plugin assembly '" + path + "': " + exception.Message
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -175,6 +175,14 @@ namespace Nuclex.Support.Plugins {
|
||||||
get { return this.assemblies; }
|
get { return this.assemblies; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>Reports an error to the debugging console</summary>
|
||||||
|
/// <param name="error">Error message that will be reported</param>
|
||||||
|
private static void reportError(string error) {
|
||||||
|
#if !XBOX360
|
||||||
|
Trace.WriteLine(error);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Loaded plugin assemblies</summary>
|
/// <summary>Loaded plugin assemblies</summary>
|
||||||
private List<Assembly> assemblies;
|
private List<Assembly> assemblies;
|
||||||
/// <summary>Takes care of loading assemblies for the repositories</summary>
|
/// <summary>Takes care of loading assemblies for the repositories</summary>
|
||||||
|
|
|
@ -4,6 +4,8 @@ using System.Text;
|
||||||
|
|
||||||
namespace Nuclex.Support.Plugins {
|
namespace Nuclex.Support.Plugins {
|
||||||
|
|
||||||
|
#if !NO_CLONING
|
||||||
|
|
||||||
/// <summary>Factory that creates instances by cloning a prototype</summary>
|
/// <summary>Factory that creates instances by cloning a prototype</summary>
|
||||||
/// <typeparam name="ProductType">Type of product created by the factory</typeparam>
|
/// <typeparam name="ProductType">Type of product created by the factory</typeparam>
|
||||||
/// <typeparam name="ConcreteType">Type of the prototype that will be cloned</typeparam>
|
/// <typeparam name="ConcreteType">Type of the prototype that will be cloned</typeparam>
|
||||||
|
@ -51,4 +53,6 @@ namespace Nuclex.Support.Plugins {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !NO_CLONING
|
||||||
|
|
||||||
} // namespace Nuclex.Support.Plugins
|
} // namespace Nuclex.Support.Plugins
|
||||||
|
|
|
@ -28,7 +28,9 @@ namespace Nuclex.Support.Scheduling {
|
||||||
/// This exception is the typical result of using AsyncAbort() on a running
|
/// This exception is the typical result of using AsyncAbort() on a running
|
||||||
/// background process.
|
/// background process.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
#if !NO_SERIALIZATION
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
#endif
|
||||||
public class AbortedException : Exception {
|
public class AbortedException : Exception {
|
||||||
|
|
||||||
/// <summary>Initializes the exception</summary>
|
/// <summary>Initializes the exception</summary>
|
||||||
|
|
|
@ -92,8 +92,13 @@ namespace Nuclex.Support.Scheduling {
|
||||||
// Force a timeout at least each second so the caller can check the system time
|
// Force a timeout at least each second so the caller can check the system time
|
||||||
// since we're not able to provide the DateTimeAdjusted notification
|
// since we're not able to provide the DateTimeAdjusted notification
|
||||||
int milliseconds = (int)(ticks / TicksPerMillisecond);
|
int milliseconds = (int)(ticks / TicksPerMillisecond);
|
||||||
|
#if XNA_3
|
||||||
bool signalled = waitHandle.WaitOne(Math.Min(1000, milliseconds), false);
|
bool signalled = waitHandle.WaitOne(Math.Min(1000, milliseconds), false);
|
||||||
|
#elif XBOX360
|
||||||
|
bool signalled = waitHandle.WaitOne(Math.Min(1000, milliseconds));
|
||||||
|
#else
|
||||||
|
bool signalled = waitHandle.WaitOne(Math.Min(1000, milliseconds), false);
|
||||||
|
#endif
|
||||||
// See whether the system date/time have been adjusted while we were asleep.
|
// See whether the system date/time have been adjusted while we were asleep.
|
||||||
checkForTimeAdjustment();
|
checkForTimeAdjustment();
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,11 @@ namespace Nuclex.Support.Scheduling {
|
||||||
|
|
||||||
this.timerThread = new Thread(new ThreadStart(runTimerThread));
|
this.timerThread = new Thread(new ThreadStart(runTimerThread));
|
||||||
this.timerThread.Name = "Nuclex.Support.Scheduling.Scheduler";
|
this.timerThread.Name = "Nuclex.Support.Scheduling.Scheduler";
|
||||||
|
#if XNA_3
|
||||||
this.timerThread.Priority = ThreadPriority.Highest;
|
this.timerThread.Priority = ThreadPriority.Highest;
|
||||||
|
#elif !XBOX360
|
||||||
|
this.timerThread.Priority = ThreadPriority.Highest;
|
||||||
|
#endif
|
||||||
this.timerThread.IsBackground = true;
|
this.timerThread.IsBackground = true;
|
||||||
this.timerThread.Start();
|
this.timerThread.Start();
|
||||||
}
|
}
|
||||||
|
@ -142,10 +146,10 @@ namespace Nuclex.Support.Scheduling {
|
||||||
// Wait for the timer thread to exit. If it doesn't exit in 10 seconds (which is
|
// Wait for the timer thread to exit. If it doesn't exit in 10 seconds (which is
|
||||||
// a lot of time given that it doesn't do any real work), forcefully abort
|
// a lot of time given that it doesn't do any real work), forcefully abort
|
||||||
// the thread. This may risk some leaks, but it's the only thing we can do.
|
// the thread. This may risk some leaks, but it's the only thing we can do.
|
||||||
Trace.Assert(
|
bool success = this.timerThread.Join(2500);
|
||||||
this.timerThread.Join(2500), "Scheduler timer thread did not exit in time"
|
#if !XBOX360
|
||||||
);
|
Trace.Assert(success, "Scheduler timer thread did not exit in time");
|
||||||
|
#endif
|
||||||
// Unsubscribe from the time source to avoid surprise events during or
|
// Unsubscribe from the time source to avoid surprise events during or
|
||||||
// after shutdown
|
// after shutdown
|
||||||
if(this.timeSource != null) {
|
if(this.timeSource != null) {
|
||||||
|
|
|
@ -65,7 +65,13 @@ namespace Nuclex.Support.Scheduling {
|
||||||
/// True if the WaitHandle was signalled, false if the timeout was reached
|
/// True if the WaitHandle was signalled, false if the timeout was reached
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public override bool WaitOne(AutoResetEvent waitHandle, long ticks) {
|
public override bool WaitOne(AutoResetEvent waitHandle, long ticks) {
|
||||||
|
#if XNA_3
|
||||||
return waitHandle.WaitOne((int)(ticks / TicksPerMillisecond), false);
|
return waitHandle.WaitOne((int)(ticks / TicksPerMillisecond), false);
|
||||||
|
#elif XBOX360
|
||||||
|
return waitHandle.WaitOne((int)(ticks / TicksPerMillisecond));
|
||||||
|
#else
|
||||||
|
return waitHandle.WaitOne((int)(ticks / TicksPerMillisecond), false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -97,7 +97,7 @@ namespace Nuclex.Support {
|
||||||
/// </param>
|
/// </param>
|
||||||
protected override void Dispose(bool explicitDisposing) {
|
protected override void Dispose(bool explicitDisposing) {
|
||||||
if(this.manualResetEvent != null) {
|
if(this.manualResetEvent != null) {
|
||||||
#if XBOX360
|
#if XBOX360 && XNA_3
|
||||||
base.Handle = IntPtr.Zero;
|
base.Handle = IntPtr.Zero;
|
||||||
#else
|
#else
|
||||||
base.SafeWaitHandle = null;
|
base.SafeWaitHandle = null;
|
||||||
|
@ -124,7 +124,13 @@ namespace Nuclex.Support {
|
||||||
/// True if the resource was available and is now locked, false if
|
/// True if the resource was available and is now locked, false if
|
||||||
/// the timeout has been reached.
|
/// the timeout has been reached.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
|
#if XNA_3 // XNA 3.0 for XBox 360 had an exitContext parameter
|
||||||
public override bool WaitOne(int millisecondsTimeout, bool exitContext) {
|
public override bool WaitOne(int millisecondsTimeout, bool exitContext) {
|
||||||
|
#elif XBOX360 // XNA 4.0 for XBox 360 has no exitContext parameter
|
||||||
|
public override bool WaitOne(int millisecondsTimeout) {
|
||||||
|
#else
|
||||||
|
public override bool WaitOne(int millisecondsTimeout, bool exitContext) {
|
||||||
|
#endif
|
||||||
for(; ; ) {
|
for(; ; ) {
|
||||||
|
|
||||||
// Lock the resource - even if it is full. We will correct out mistake later
|
// Lock the resource - even if it is full. We will correct out mistake later
|
||||||
|
@ -149,7 +155,13 @@ namespace Nuclex.Support {
|
||||||
// Unless we have been preempted by a Release(), we now have to wait for the
|
// Unless we have been preempted by a Release(), we now have to wait for the
|
||||||
// resource to become available.
|
// resource to become available.
|
||||||
if(newFree >= 0) {
|
if(newFree >= 0) {
|
||||||
|
#if XNA_3 // XNA 3.0 for XBox 360 had an exitContext parameter
|
||||||
if(!this.manualResetEvent.WaitOne(millisecondsTimeout, exitContext)) {
|
if(!this.manualResetEvent.WaitOne(millisecondsTimeout, exitContext)) {
|
||||||
|
#elif XBOX360 // XNA 4.0 for XBox 360 has no exitContext parameter
|
||||||
|
if (!this.manualResetEvent.WaitOne(millisecondsTimeout)) {
|
||||||
|
#else
|
||||||
|
if(!this.manualResetEvent.WaitOne(millisecondsTimeout, exitContext)) {
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,7 +169,6 @@ namespace Nuclex.Support {
|
||||||
} // for(; ; )
|
} // for(; ; )
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XBOX360
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Waits for the resource to become available and locks it
|
/// Waits for the resource to become available and locks it
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -166,11 +177,16 @@ namespace Nuclex.Support {
|
||||||
/// the timeout has been reached.
|
/// the timeout has been reached.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public override bool WaitOne() {
|
public override bool WaitOne() {
|
||||||
|
#if XNA_3 // XNA 3.0 for XBox 360 had an exitContext parameter
|
||||||
|
return WaitOne(-1, false);
|
||||||
|
#elif XBOX360 // XNA 4.0 for XBox 360 has no exitContext parameter
|
||||||
|
return WaitOne(-1);
|
||||||
|
#else
|
||||||
return WaitOne(-1, false);
|
return WaitOne(-1, false);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#if !XBOX360
|
#if !(XNA_3 && XBOX360)
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Waits for the resource to become available and locks it
|
/// Waits for the resource to become available and locks it
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -185,7 +201,11 @@ namespace Nuclex.Support {
|
||||||
/// True if the resource was available and is now locked, false if
|
/// True if the resource was available and is now locked, false if
|
||||||
/// the timeout has been reached.
|
/// the timeout has been reached.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
|
#if XBOX360
|
||||||
|
public override bool WaitOne(TimeSpan timeout) {
|
||||||
|
#else
|
||||||
public override bool WaitOne(TimeSpan timeout, bool exitContext) {
|
public override bool WaitOne(TimeSpan timeout, bool exitContext) {
|
||||||
|
#endif
|
||||||
long totalMilliseconds = (long)timeout.TotalMilliseconds;
|
long totalMilliseconds = (long)timeout.TotalMilliseconds;
|
||||||
if((totalMilliseconds < -1) || (totalMilliseconds > int.MaxValue)) {
|
if((totalMilliseconds < -1) || (totalMilliseconds > int.MaxValue)) {
|
||||||
throw new ArgumentOutOfRangeException(
|
throw new ArgumentOutOfRangeException(
|
||||||
|
@ -193,9 +213,13 @@ namespace Nuclex.Support {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if XBOX360
|
||||||
|
return WaitOne((int)totalMilliseconds);
|
||||||
|
#else
|
||||||
return WaitOne((int)totalMilliseconds, exitContext);
|
return WaitOne((int)totalMilliseconds, exitContext);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
#endif // !(XNA_3 && XBOX360)
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Releases a lock on the resource. Note that for a reverse counting semaphore,
|
/// Releases a lock on the resource. Note that for a reverse counting semaphore,
|
||||||
|
@ -214,7 +238,7 @@ namespace Nuclex.Support {
|
||||||
/// <summary>Creates the event used to make threads wait for the resource</summary>
|
/// <summary>Creates the event used to make threads wait for the resource</summary>
|
||||||
private void createEvent() {
|
private void createEvent() {
|
||||||
this.manualResetEvent = new ManualResetEvent(false);
|
this.manualResetEvent = new ManualResetEvent(false);
|
||||||
#if XBOX360
|
#if XBOX360 && XNA_3
|
||||||
base.Handle = this.manualResetEvent.Handle;
|
base.Handle = this.manualResetEvent.Handle;
|
||||||
#else
|
#else
|
||||||
base.SafeWaitHandle = this.manualResetEvent.SafeWaitHandle;
|
base.SafeWaitHandle = this.manualResetEvent.SafeWaitHandle;
|
||||||
|
|
|
@ -39,7 +39,9 @@ namespace Nuclex.Support {
|
||||||
/// in parsers, it can also prevent needless string copying and garbage generation.
|
/// in parsers, it can also prevent needless string copying and garbage generation.
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
#if !NO_SERIALIZATION
|
||||||
[Serializable, StructLayout(LayoutKind.Sequential)]
|
[Serializable, StructLayout(LayoutKind.Sequential)]
|
||||||
|
#endif
|
||||||
public struct StringSegment {
|
public struct StringSegment {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -196,21 +196,26 @@ namespace Nuclex.Support.Tracking {
|
||||||
lock(this.trackedTransactions) {
|
lock(this.trackedTransactions) {
|
||||||
|
|
||||||
// Locate the object to be untracked in our collection
|
// Locate the object to be untracked in our collection
|
||||||
int removeIndex = this.trackedTransactions.FindIndex(
|
int index;
|
||||||
new Predicate<ObservedWeightedTransaction<Transaction>>(
|
for(index = 0; index < this.trackedTransactions.Count; ++index) {
|
||||||
new TransactionMatcher(transaction).Matches
|
bool same = ReferenceEquals(
|
||||||
)
|
transaction,
|
||||||
|
this.trackedTransactions[index].WeightedTransaction.Transaction
|
||||||
);
|
);
|
||||||
if(removeIndex == -1) {
|
if(same) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(index == this.trackedTransactions.Count) {
|
||||||
throw new ArgumentException("Specified transaction is not being tracked");
|
throw new ArgumentException("Specified transaction is not being tracked");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove and dispose the transaction the user wants to untrack
|
// Remove and dispose the transaction the user wants to untrack
|
||||||
{
|
{
|
||||||
ObservedWeightedTransaction<Transaction> wrappedTransaction =
|
ObservedWeightedTransaction<Transaction> wrappedTransaction =
|
||||||
this.trackedTransactions[removeIndex];
|
this.trackedTransactions[index];
|
||||||
|
|
||||||
this.trackedTransactions.RemoveAt(removeIndex);
|
this.trackedTransactions.RemoveAt(index);
|
||||||
wrappedTransaction.Dispose();
|
wrappedTransaction.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +233,7 @@ namespace Nuclex.Support.Tracking {
|
||||||
// weight would work, too, but we might accumulate rounding errors making the sum
|
// weight would work, too, but we might accumulate rounding errors making the sum
|
||||||
// drift slowly away from the actual value.
|
// drift slowly away from the actual value.
|
||||||
float newTotalWeight = 0.0f;
|
float newTotalWeight = 0.0f;
|
||||||
for(int index = 0; index < this.trackedTransactions.Count; ++index)
|
for(index = 0; index < this.trackedTransactions.Count; ++index)
|
||||||
newTotalWeight += this.trackedTransactions[index].WeightedTransaction.Weight;
|
newTotalWeight += this.trackedTransactions[index].WeightedTransaction.Weight;
|
||||||
|
|
||||||
this.totalWeight = newTotalWeight;
|
this.totalWeight = newTotalWeight;
|
||||||
|
|
|
@ -164,7 +164,13 @@ namespace Nuclex.Support.Tracking {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if XNA_3
|
||||||
return WaitHandle.WaitOne(timeoutMilliseconds, false);
|
return WaitHandle.WaitOne(timeoutMilliseconds, false);
|
||||||
|
#elif XBOX360
|
||||||
|
return WaitHandle.WaitOne(timeoutMilliseconds);
|
||||||
|
#else
|
||||||
|
return WaitHandle.WaitOne(timeoutMilliseconds, false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Whether the transaction has ended already</summary>
|
/// <summary>Whether the transaction has ended already</summary>
|
||||||
|
|
|
@ -28,7 +28,9 @@ namespace Nuclex.Support {
|
||||||
/// Type-safe weak reference, referencing an object while still allowing
|
/// Type-safe weak reference, referencing an object while still allowing
|
||||||
/// that object to be garbage collected.
|
/// that object to be garbage collected.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
#if !NO_SERIALIZATION
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
#endif
|
||||||
public class WeakReference<ReferencedType> : WeakReference
|
public class WeakReference<ReferencedType> : WeakReference
|
||||||
where ReferencedType : class {
|
where ReferencedType : class {
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,8 @@ namespace Nuclex.Support {
|
||||||
/// <summary>Helper routines for handling XML code</summary>
|
/// <summary>Helper routines for handling XML code</summary>
|
||||||
public static class XmlHelper {
|
public static class XmlHelper {
|
||||||
|
|
||||||
|
#if !NO_XMLDOCUMENT
|
||||||
|
|
||||||
#region class ValidationEventProcessor
|
#region class ValidationEventProcessor
|
||||||
|
|
||||||
/// <summary>Handles any events occurring when an XML schema is loaded</summary>
|
/// <summary>Handles any events occurring when an XML schema is loaded</summary>
|
||||||
|
@ -207,6 +209,8 @@ namespace Nuclex.Support {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !NO_XMLDOCUMENT
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Nuclex.Support
|
} // namespace Nuclex.Support
|
||||||
|
|
Loading…
Reference in New Issue
Block a user