| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- //
- // System.Threading.Monitor.cs
- //
- // Author:
- // Dick Porter ([email protected])
- //
- // (C) Ximian, Inc. http://www.ximian.com
- //
- namespace System.Threading
- {
- public sealed class Monitor
- {
- public static void Enter(object obj) {
- if(obj==null) {
- throw new ArgumentNullException("obj");
- }
- if(obj.GetType().IsValueType==true) {
- throw new ArgumentException("Value type");
- }
- // FIXME
- }
- public static void Exit(object obj) {
- if(obj==null) {
- throw new ArgumentNullException("obj");
- }
- if(obj.GetType().IsValueType==true) {
- throw new ArgumentException("Value type");
- }
- // FIXME
- }
- public static void Pulse(object obj) {
- if(obj==null) {
- throw new ArgumentNullException("obj");
- }
- // FIXME
- }
- public static void PulseAll(object obj) {
- if(obj==null) {
- throw new ArgumentNullException("obj");
- }
- // FIXME
- }
- public static bool TryEnter(object obj) {
- if(obj==null) {
- throw new ArgumentNullException("obj");
- }
- if(obj.GetType().IsValueType==true) {
- throw new ArgumentException("Value type");
- }
-
- // FIXME
- return(false);
- }
- public static bool TryEnter(object obj, int millisecondsTimeout) {
- if(obj==null) {
- throw new ArgumentNullException("obj");
- }
- if(obj.GetType().IsValueType==true) {
- throw new ArgumentException("Value type");
- }
- if(millisecondsTimeout<0) {
- throw new ArgumentException("millisecondsTimeout negative");
- }
- // FIXME
- return(false);
- }
- public static bool TryEnter(object obj, TimeSpan timeout) {
- if(obj==null) {
- throw new ArgumentNullException("obj");
- }
- if(obj.GetType().IsValueType==true) {
- throw new ArgumentException("Value type");
- }
- if(timeout.Milliseconds < 0 || timeout.Milliseconds > Int32.MaxValue) {
- throw new ArgumentOutOfRangeException("timeout out of range");
- }
-
- // FIXME
- return(false);
- }
- public static bool Wait(object obj) {
- if(obj==null) {
- throw new ArgumentNullException("obj");
- }
- // FIXME
- return(false);
- }
- public static bool Wait(object obj, int millisecondsTimeout) {
- if(obj==null) {
- throw new ArgumentNullException("obj");
- }
- // FIXME
- return(false);
- }
- public static bool Wait(object obj, TimeSpan timeout) {
- if(obj==null) {
- throw new ArgumentNullException("obj");
- }
- // LAMESPEC: says to throw ArgumentException too
- if(timeout.Milliseconds < 0 || timeout.Milliseconds > Int32.MaxValue) {
- throw new ArgumentOutOfRangeException("timeout out of range");
- }
-
- // FIXME
- return(false);
- }
- public static bool Wait(object obj, int millisecondsTimeout, bool exitContext) {
- if(obj==null) {
- throw new ArgumentNullException("obj");
- }
- // FIXME
- return(false);
- }
- public static bool Wait(object obj, TimeSpan timeout, bool exitContext) {
- if(obj==null) {
- throw new ArgumentNullException("obj");
- }
- // LAMESPEC: says to throw ArgumentException too
- if(timeout.Milliseconds < 0 || timeout.Milliseconds > Int32.MaxValue) {
- throw new ArgumentOutOfRangeException("timeout out of range");
- }
-
- // FIXME
- return(false);
- }
- }
- }
|