Removed a dead variable when cloning arrays
git-svn-id: file:///srv/devel/repo-conversion/nusu@242 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
cd6cec42d3
commit
91da3679a8
|
@ -61,7 +61,6 @@
|
|||
<DependentUpon>AffineThreadPool.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Source\Cloning\CloneFactoryTest.cs" />
|
||||
<Compile Include="Source\Cloning\CloningParameters.cs" />
|
||||
<Compile Include="Source\Cloning\ExpressionTreeCloner.cs" />
|
||||
<Compile Include="Source\Cloning\ExpressionTreeCloner.FieldBased.cs">
|
||||
<DependentUpon>ExpressionTreeCloner.cs</DependentUpon>
|
||||
|
|
|
@ -92,7 +92,6 @@
|
|||
<DependentUpon>AffineThreadPool.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Source\Cloning\CloneFactoryTest.cs" />
|
||||
<Compile Include="Source\Cloning\CloningParameters.cs" />
|
||||
<Compile Include="Source\Cloning\ExpressionTreeCloner.cs" />
|
||||
<Compile Include="Source\Cloning\ExpressionTreeCloner.FieldBased.cs">
|
||||
<DependentUpon>ExpressionTreeCloner.cs</DependentUpon>
|
||||
|
|
|
@ -103,7 +103,6 @@
|
|||
<DependentUpon>AffineThreadPool.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Source\Cloning\CloneFactoryTest.cs" />
|
||||
<Compile Include="Source\Cloning\CloningParameters.cs" />
|
||||
<Compile Include="Source\Cloning\ExpressionTreeCloner.cs" />
|
||||
<Compile Include="Source\Cloning\ExpressionTreeCloner.FieldBased.cs">
|
||||
<DependentUpon>ExpressionTreeCloner.cs</DependentUpon>
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
#region CPL License
|
||||
/*
|
||||
Nuclex Framework
|
||||
Copyright (C) 2002-2010 Nuclex Development Labs
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the IBM Common Public License as
|
||||
published by the IBM Corporation; either version 1.0 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
IBM Common Public License for more details.
|
||||
|
||||
You should have received a copy of the IBM Common Public
|
||||
License along with this library
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace Nuclex.Support.Cloning {
|
||||
|
||||
/// <summary>Parameters of a cloning operation</summary>
|
||||
public struct CloningParameters {
|
||||
|
||||
/// <summary>Initializes new cloning parameters</summary>
|
||||
/// <param name="type">Type that will be cloned</param>
|
||||
/// <param name="deep">Whether to perform a deep clone</param>
|
||||
public CloningParameters(Type type, bool deep) {
|
||||
this.Type = type;
|
||||
this.Deep = deep;
|
||||
}
|
||||
|
||||
/// <summary>Returns a string description of the instance</summary>
|
||||
/// <returns>The instance's string description</returns>
|
||||
public override string ToString() {
|
||||
if(this.Deep) {
|
||||
return "Deep clone of " + this.Type.ToString();
|
||||
} else {
|
||||
return "Shallow clone of " + this.Type.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a hash code that is identical for instances with identical state
|
||||
/// </summary>
|
||||
/// <returns>The instance's hash code</returns>
|
||||
public override int GetHashCode() {
|
||||
if(this.Deep) {
|
||||
return this.Type.GetHashCode();
|
||||
} else {
|
||||
return ~this.Type.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Type that will be cloned</summary>
|
||||
public Type Type;
|
||||
/// <summary>Whether a deep clone will be performed</summary>
|
||||
public bool Deep;
|
||||
|
||||
}
|
||||
|
||||
} // namespace Nuclex.Support.Cloning
|
File diff suppressed because it is too large
Load Diff
|
@ -22,9 +22,6 @@ License along with this library
|
|||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Nuclex.Support.Cloning {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user