Changed all remaining COMPACTFRAMEWORK constants around serialization code to NO_SERIALIZATION

git-svn-id: file:///srv/devel/repo-conversion/nusu@157 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2009-06-26 20:17:59 +00:00
parent 8f16d09c8a
commit 74bf351727
6 changed files with 24 additions and 18 deletions

View File

@ -31,15 +31,15 @@ namespace Nuclex.Support.Collections {
/// <typeparam name="ValueType">Type of the values used in the dictionary</typeparam>
[Serializable]
public class ObservableDictionary<KeyType, ValueType> :
#if !COMPACTFRAMEWORK
#if !NO_SERIALIZATION
ISerializable,
IDeserializationCallback,
#endif
IDictionary<KeyType, ValueType>,
IDictionary<KeyType, ValueType>,
IDictionary,
IObservableCollection<KeyValuePair<KeyType, ValueType>> {
#if !COMPACTFRAMEWORK
#if !NO_SERIALIZATION
#region class SerializedDictionary
/// <summary>
@ -87,7 +87,8 @@ namespace Nuclex.Support.Collections {
this.objectDictionary = (this.typedDictionary as IDictionary);
}
#if !COMPACTFRAMEWORK
#if !NO_SERIALIZATION
/// <summary>
/// Initializes a new instance of the System.WeakReference class, using deserialized
/// data from the specified serialization and stream objects.
@ -105,7 +106,8 @@ namespace Nuclex.Support.Collections {
/// </exception>
protected ObservableDictionary(SerializationInfo info, StreamingContext context) :
this(new SerializedDictionary(info, context)) { }
#endif // !COMPACTFRAMEWORK
#endif // !NO_SERIALIZATION
/// <summary>Whether the directory is write-protected</summary>
public bool IsReadOnly {
@ -374,7 +376,7 @@ namespace Nuclex.Support.Collections {
#endregion
#if !COMPACTFRAMEWORK
#if !NO_SERIALIZATION
#region ISerializable implementation
/// <summary>Serializes the Dictionary</summary>
@ -395,7 +397,7 @@ namespace Nuclex.Support.Collections {
}
#endregion
#endif //!COMPACTFRAMEWORK
#endif //!NO_SERIALIZATION
/// <summary>The wrapped Dictionary under its type-safe interface</summary>
private IDictionary<KeyType, ValueType> typedDictionary;

View File

@ -31,14 +31,14 @@ namespace Nuclex.Support.Collections {
/// <typeparam name="ValueType">Type of the values used in the dictionary</typeparam>
[Serializable]
public class ReadOnlyDictionary<KeyType, ValueType> :
#if !COMPACTFRAMEWORK
#if !NO_SERIALIZATION
ISerializable,
IDeserializationCallback,
#endif
IDictionary<KeyType, ValueType>,
IDictionary {
#if !COMPACTFRAMEWORK
#if !NO_SERIALIZATION
#region class SerializedDictionary
@ -87,7 +87,7 @@ namespace Nuclex.Support.Collections {
protected ReadOnlyDictionary(SerializationInfo info, StreamingContext context) :
this(new SerializedDictionary(info, context)) { }
#endif // !COMPACTFRAMEWORK
#endif // !NO_SERIALIZATION
/// <summary>Initializes a new read-only dictionary wrapper</summary>
/// <param name="dictionary">Dictionary that will be wrapped</param>
@ -367,7 +367,7 @@ namespace Nuclex.Support.Collections {
#endregion
#if !COMPACTFRAMEWORK
#if !NO_SERIALIZATION
#region ISerializable implementation
/// <summary>Serializes the Dictionary</summary>
@ -388,7 +388,7 @@ namespace Nuclex.Support.Collections {
}
#endregion
#endif //!COMPACTFRAMEWORK
#endif //!NO_SERIALIZATION
/// <summary>The wrapped Dictionary under its type-safe interface</summary>
private IDictionary<KeyType, ValueType> typedDictionary;

View File

@ -66,7 +66,7 @@ namespace Nuclex.Support.Plugins {
loadedAssembly = LoadAssemblyFromFile(path);
return true;
}
#if !COMPACTFRAMEWORK
#if !XBOX360
// File not found - Most likely a missing dependency of the assembly we
// attempted to load since the assembly itself has been found by the GetFiles() method
catch(DllNotFoundException) {
@ -74,7 +74,7 @@ namespace Nuclex.Support.Plugins {
"Assembly '" + path + "' or one of its dependencies is missing"
);
}
#endif // !COMPACTFRAMEWORK
#endif // !XBOX360
// 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
catch(UnauthorizedAccessException) {

View File

@ -75,9 +75,13 @@ namespace Nuclex.Support.Scheduling {
get { return Environment.OSVersion.Platform == PlatformID.Win32NT; }
}
#if !XBOX360
/// <summary>Delegate for the timeChanged() callback method</summary>
private EventHandler onDateTimeAdjustedDelegate;
#endif // !XBOX360
}
} // namespace Nuclex.Support.Scheduling

View File

@ -133,7 +133,7 @@ namespace Nuclex.Support.Tracking {
}
}
#if !COMPACTFRAMEWORK
#if !XBOX360
/// <summary>Waits until the background process finishes or a timeout occurs</summary>
/// <param name="timeout">
@ -150,7 +150,7 @@ namespace Nuclex.Support.Tracking {
return WaitHandle.WaitOne(timeout, false);
}
#endif // !COMPACTFRAMEWORK
#endif // !XBOX360
/// <summary>Waits until the background process finishes or a timeout occurs</summary>
/// <param name="timeoutMilliseconds">

View File

@ -52,7 +52,7 @@ namespace Nuclex.Support {
public WeakReference(ReferencedType target, bool trackResurrection) :
base(target, trackResurrection) { }
#if !COMPACTFRAMEWORK
#if !NO_SERIALIZATION
/// <summary>
/// Initializes a new instance of the WeakReference class, using deserialized
@ -72,7 +72,7 @@ namespace Nuclex.Support {
protected WeakReference(SerializationInfo info, StreamingContext context) :
base(info, context) { }
#endif // !COMPACTFRAMEWORK
#endif // !NO_SERIALIZATION
/// <summary>
/// Gets or sets the object (the target) referenced by the current WeakReference