Added some read-only attributes to the cloner implementations
git-svn-id: file:///srv/devel/repo-conversion/nusu@266 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
		
							parent
							
								
									21754b8e87
								
							
						
					
					
						commit
						f3652ac4db
					
				
					 3 changed files with 15 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -299,7 +299,6 @@ namespace Nuclex.Support.Cloning {
 | 
			
		|||
      variables.Add(clone);
 | 
			
		||||
 | 
			
		||||
      int dimensionCount = clonedType.GetArrayRank();
 | 
			
		||||
      int baseVariableIndex = variables.Count;
 | 
			
		||||
      Type elementType = clonedType.GetElementType();
 | 
			
		||||
 | 
			
		||||
      var lengths = new List<ParameterExpression>();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -263,13 +263,21 @@ namespace Nuclex.Support.Cloning {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    /// <summary>Compiled cloners that perform shallow clone operations</summary>
 | 
			
		||||
    private static ConcurrentDictionary<Type, Func<object, object>> shallowFieldBasedCloners;
 | 
			
		||||
    private static readonly ConcurrentDictionary<
 | 
			
		||||
      Type, Func<object, object>
 | 
			
		||||
    > shallowFieldBasedCloners;
 | 
			
		||||
    /// <summary>Compiled cloners that perform deep clone operations</summary>
 | 
			
		||||
    private static ConcurrentDictionary<Type, Func<object, object>> deepFieldBasedCloners;
 | 
			
		||||
    private static readonly ConcurrentDictionary<
 | 
			
		||||
      Type, Func<object, object>
 | 
			
		||||
    > deepFieldBasedCloners;
 | 
			
		||||
    /// <summary>Compiled cloners that perform shallow clone operations</summary>
 | 
			
		||||
    private static ConcurrentDictionary<Type, Func<object, object>> shallowPropertyBasedCloners;
 | 
			
		||||
    private static readonly ConcurrentDictionary<
 | 
			
		||||
      Type, Func<object, object>
 | 
			
		||||
    > shallowPropertyBasedCloners;
 | 
			
		||||
    /// <summary>Compiled cloners that perform deep clone operations</summary>
 | 
			
		||||
    private static ConcurrentDictionary<Type, Func<object, object>> deepPropertyBasedCloners;
 | 
			
		||||
    private static readonly ConcurrentDictionary<
 | 
			
		||||
      Type, Func<object, object>
 | 
			
		||||
    > deepPropertyBasedCloners;
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -92,7 +92,7 @@ namespace Nuclex.Support.Cloning {
 | 
			
		|||
      }
 | 
			
		||||
 | 
			
		||||
      /// <summary>Surrogate the that will be selected for any non-primitive types</summary>
 | 
			
		||||
      private ISerializationSurrogate staticSurrogate;
 | 
			
		||||
      private readonly ISerializationSurrogate staticSurrogate;
 | 
			
		||||
      /// <summary>Surrogate selector to escalate to if no surrogate can be provided</summary>
 | 
			
		||||
      private ISurrogateSelector chainedSelector;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -321,9 +321,9 @@ namespace Nuclex.Support.Cloning {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    /// <summary>Serializes objects by storing their fields</summary>
 | 
			
		||||
    private static BinaryFormatter fieldBasedFormatter;
 | 
			
		||||
    private static readonly BinaryFormatter fieldBasedFormatter;
 | 
			
		||||
    /// <summary>Serializes objects by storing their properties</summary>
 | 
			
		||||
    private static BinaryFormatter propertyBasedFormatter;
 | 
			
		||||
    private static readonly BinaryFormatter propertyBasedFormatter;
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue