return (other.array == array && other.offset == offset);
}
+ public bool Equals (ArrayWithOffset obj)
+ {
+ return obj.array == array && obj.offset == offset;
+ }
+
public override int GetHashCode ()
{
return offset;
namespace System.Runtime.InteropServices
{
[Flags]
- [Serializable]
+#if NET_2_0
+ [ComVisible(true)]
+#endif
public enum AssemblyRegistrationFlags {
None = 0,
SetCodeBase,
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
+using System;
namespace System.Runtime.InteropServices {
-
- /// <summary>
- /// </summary>
+#if NET_2_0
+ [Serializable]
+#endif
public enum CallingConvention {
-
- /// <summary>
- /// </summary>
Winapi = 1,
-
- /// <summary>
- /// </summary>
Cdecl = 2,
-
- /// <summary>
- /// </summary>
StdCall = 3,
-
- /// <summary>
- /// </summary>
ThisCall = 4,
-
- /// <summary>
- /// </summary>
FastCall = 5,
- } // CallingConvention
+ }
} // System.Runtime.InteropServices
+2006-12-21 Miguel de Icaza <miguel@novell.com>
+
+ * CriticalHandle.cs: Add Dispose(bool disposing) method, and
+ refactor.
+
2006-12-15 Gert Driesen <drieseng@users.sourceforge.net>
* Marshal.cs: Use SystemDefaultCharSize to determine whether to
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
+using System;
namespace System.Runtime.InteropServices {
-
- /// <summary>
- /// </summary>
+#if NET_2_0
+ [Serializable]
+#endif
public enum CharSet {
-
None = 1,
-
- /// <summary>
- /// </summary>
Ansi = 2,
-
- /// <summary>
- /// </summary>
Unicode = 3,
-
- /// <summary>
- /// </summary>
Auto = 4,
- } // CharSet
+ }
} // System.Runtime.InteropServices
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
~CriticalHandle ()
{
- Dispose ();
+ Dispose (false);
}
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
public void Close ()
{
- Dispose ();
+ Dispose (true);
}
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
public void Dispose ()
+ {
+ Dispose (true);
+ }
+
+ public void Dispose (bool disposing)
{
if (_disposed)
return;
if (IsInvalid)
return;
- if (ReleaseHandle ()) {
- GC.SuppressFinalize (this);
- } else {
- // Failed in release...
+ if (disposing == true){
+ if (ReleaseHandle ()) {
+ GC.SuppressFinalize (this);
+ } else {
+ // Failed in release...
+ }
}
}