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:
parent
8f16d09c8a
commit
74bf351727
|
@ -31,7 +31,7 @@ namespace Nuclex.Support.Collections {
|
||||||
/// <typeparam name="ValueType">Type of the values used in the dictionary</typeparam>
|
/// <typeparam name="ValueType">Type of the values used in the dictionary</typeparam>
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ObservableDictionary<KeyType, ValueType> :
|
public class ObservableDictionary<KeyType, ValueType> :
|
||||||
#if !COMPACTFRAMEWORK
|
#if !NO_SERIALIZATION
|
||||||
ISerializable,
|
ISerializable,
|
||||||
IDeserializationCallback,
|
IDeserializationCallback,
|
||||||
#endif
|
#endif
|
||||||
|
@ -39,7 +39,7 @@ namespace Nuclex.Support.Collections {
|
||||||
IDictionary,
|
IDictionary,
|
||||||
IObservableCollection<KeyValuePair<KeyType, ValueType>> {
|
IObservableCollection<KeyValuePair<KeyType, ValueType>> {
|
||||||
|
|
||||||
#if !COMPACTFRAMEWORK
|
#if !NO_SERIALIZATION
|
||||||
#region class SerializedDictionary
|
#region class SerializedDictionary
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -87,7 +87,8 @@ namespace Nuclex.Support.Collections {
|
||||||
this.objectDictionary = (this.typedDictionary as IDictionary);
|
this.objectDictionary = (this.typedDictionary as IDictionary);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !COMPACTFRAMEWORK
|
#if !NO_SERIALIZATION
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the System.WeakReference class, using deserialized
|
/// Initializes a new instance of the System.WeakReference class, using deserialized
|
||||||
/// data from the specified serialization and stream objects.
|
/// data from the specified serialization and stream objects.
|
||||||
|
@ -105,7 +106,8 @@ namespace Nuclex.Support.Collections {
|
||||||
/// </exception>
|
/// </exception>
|
||||||
protected ObservableDictionary(SerializationInfo info, StreamingContext context) :
|
protected ObservableDictionary(SerializationInfo info, StreamingContext context) :
|
||||||
this(new SerializedDictionary(info, context)) { }
|
this(new SerializedDictionary(info, context)) { }
|
||||||
#endif // !COMPACTFRAMEWORK
|
|
||||||
|
#endif // !NO_SERIALIZATION
|
||||||
|
|
||||||
/// <summary>Whether the directory is write-protected</summary>
|
/// <summary>Whether the directory is write-protected</summary>
|
||||||
public bool IsReadOnly {
|
public bool IsReadOnly {
|
||||||
|
@ -374,7 +376,7 @@ namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#if !COMPACTFRAMEWORK
|
#if !NO_SERIALIZATION
|
||||||
#region ISerializable implementation
|
#region ISerializable implementation
|
||||||
|
|
||||||
/// <summary>Serializes the Dictionary</summary>
|
/// <summary>Serializes the Dictionary</summary>
|
||||||
|
@ -395,7 +397,7 @@ namespace Nuclex.Support.Collections {
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#endif //!COMPACTFRAMEWORK
|
#endif //!NO_SERIALIZATION
|
||||||
|
|
||||||
/// <summary>The wrapped Dictionary under its type-safe interface</summary>
|
/// <summary>The wrapped Dictionary under its type-safe interface</summary>
|
||||||
private IDictionary<KeyType, ValueType> typedDictionary;
|
private IDictionary<KeyType, ValueType> typedDictionary;
|
||||||
|
|
|
@ -31,14 +31,14 @@ namespace Nuclex.Support.Collections {
|
||||||
/// <typeparam name="ValueType">Type of the values used in the dictionary</typeparam>
|
/// <typeparam name="ValueType">Type of the values used in the dictionary</typeparam>
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ReadOnlyDictionary<KeyType, ValueType> :
|
public class ReadOnlyDictionary<KeyType, ValueType> :
|
||||||
#if !COMPACTFRAMEWORK
|
#if !NO_SERIALIZATION
|
||||||
ISerializable,
|
ISerializable,
|
||||||
IDeserializationCallback,
|
IDeserializationCallback,
|
||||||
#endif
|
#endif
|
||||||
IDictionary<KeyType, ValueType>,
|
IDictionary<KeyType, ValueType>,
|
||||||
IDictionary {
|
IDictionary {
|
||||||
|
|
||||||
#if !COMPACTFRAMEWORK
|
#if !NO_SERIALIZATION
|
||||||
|
|
||||||
#region class SerializedDictionary
|
#region class SerializedDictionary
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ namespace Nuclex.Support.Collections {
|
||||||
protected ReadOnlyDictionary(SerializationInfo info, StreamingContext context) :
|
protected ReadOnlyDictionary(SerializationInfo info, StreamingContext context) :
|
||||||
this(new SerializedDictionary(info, context)) { }
|
this(new SerializedDictionary(info, context)) { }
|
||||||
|
|
||||||
#endif // !COMPACTFRAMEWORK
|
#endif // !NO_SERIALIZATION
|
||||||
|
|
||||||
/// <summary>Initializes a new read-only dictionary wrapper</summary>
|
/// <summary>Initializes a new read-only dictionary wrapper</summary>
|
||||||
/// <param name="dictionary">Dictionary that will be wrapped</param>
|
/// <param name="dictionary">Dictionary that will be wrapped</param>
|
||||||
|
@ -367,7 +367,7 @@ namespace Nuclex.Support.Collections {
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#if !COMPACTFRAMEWORK
|
#if !NO_SERIALIZATION
|
||||||
#region ISerializable implementation
|
#region ISerializable implementation
|
||||||
|
|
||||||
/// <summary>Serializes the Dictionary</summary>
|
/// <summary>Serializes the Dictionary</summary>
|
||||||
|
@ -388,7 +388,7 @@ namespace Nuclex.Support.Collections {
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#endif //!COMPACTFRAMEWORK
|
#endif //!NO_SERIALIZATION
|
||||||
|
|
||||||
/// <summary>The wrapped Dictionary under its type-safe interface</summary>
|
/// <summary>The wrapped Dictionary under its type-safe interface</summary>
|
||||||
private IDictionary<KeyType, ValueType> typedDictionary;
|
private IDictionary<KeyType, ValueType> typedDictionary;
|
||||||
|
|
|
@ -66,7 +66,7 @@ namespace Nuclex.Support.Plugins {
|
||||||
loadedAssembly = LoadAssemblyFromFile(path);
|
loadedAssembly = LoadAssemblyFromFile(path);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if !COMPACTFRAMEWORK
|
#if !XBOX360
|
||||||
// File not found - Most likely a missing dependency of the assembly we
|
// 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
|
// attempted to load since the assembly itself has been found by the GetFiles() method
|
||||||
catch(DllNotFoundException) {
|
catch(DllNotFoundException) {
|
||||||
|
@ -74,7 +74,7 @@ namespace Nuclex.Support.Plugins {
|
||||||
"Assembly '" + path + "' or one of its dependencies is missing"
|
"Assembly '" + path + "' or one of its dependencies is missing"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#endif // !COMPACTFRAMEWORK
|
#endif // !XBOX360
|
||||||
// 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) {
|
||||||
|
|
|
@ -75,9 +75,13 @@ namespace Nuclex.Support.Scheduling {
|
||||||
get { return Environment.OSVersion.Platform == PlatformID.Win32NT; }
|
get { return Environment.OSVersion.Platform == PlatformID.Win32NT; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !XBOX360
|
||||||
|
|
||||||
/// <summary>Delegate for the timeChanged() callback method</summary>
|
/// <summary>Delegate for the timeChanged() callback method</summary>
|
||||||
private EventHandler onDateTimeAdjustedDelegate;
|
private EventHandler onDateTimeAdjustedDelegate;
|
||||||
|
|
||||||
|
#endif // !XBOX360
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Nuclex.Support.Scheduling
|
} // namespace Nuclex.Support.Scheduling
|
||||||
|
|
|
@ -133,7 +133,7 @@ namespace Nuclex.Support.Tracking {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !COMPACTFRAMEWORK
|
#if !XBOX360
|
||||||
|
|
||||||
/// <summary>Waits until the background process finishes or a timeout occurs</summary>
|
/// <summary>Waits until the background process finishes or a timeout occurs</summary>
|
||||||
/// <param name="timeout">
|
/// <param name="timeout">
|
||||||
|
@ -150,7 +150,7 @@ namespace Nuclex.Support.Tracking {
|
||||||
return WaitHandle.WaitOne(timeout, false);
|
return WaitHandle.WaitOne(timeout, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !COMPACTFRAMEWORK
|
#endif // !XBOX360
|
||||||
|
|
||||||
/// <summary>Waits until the background process finishes or a timeout occurs</summary>
|
/// <summary>Waits until the background process finishes or a timeout occurs</summary>
|
||||||
/// <param name="timeoutMilliseconds">
|
/// <param name="timeoutMilliseconds">
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace Nuclex.Support {
|
||||||
public WeakReference(ReferencedType target, bool trackResurrection) :
|
public WeakReference(ReferencedType target, bool trackResurrection) :
|
||||||
base(target, trackResurrection) { }
|
base(target, trackResurrection) { }
|
||||||
|
|
||||||
#if !COMPACTFRAMEWORK
|
#if !NO_SERIALIZATION
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the WeakReference class, using deserialized
|
/// Initializes a new instance of the WeakReference class, using deserialized
|
||||||
|
@ -72,7 +72,7 @@ namespace Nuclex.Support {
|
||||||
protected WeakReference(SerializationInfo info, StreamingContext context) :
|
protected WeakReference(SerializationInfo info, StreamingContext context) :
|
||||||
base(info, context) { }
|
base(info, context) { }
|
||||||
|
|
||||||
#endif // !COMPACTFRAMEWORK
|
#endif // !NO_SERIALIZATION
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the object (the target) referenced by the current WeakReference
|
/// Gets or sets the object (the target) referenced by the current WeakReference
|
||||||
|
|
Loading…
Reference in New Issue
Block a user