예제 #1
0
        internal static void Dispatch(SharedObjectMessage message)
        {
            RemoteSharedObject obj2 = null;

            lock (((ICollection)SharedObjects).SyncRoot)
            {
                if (SharedObjects.ContainsKey(message.Name))
                {
                    obj2 = SharedObjects[message.Name];
                }
            }
            if (obj2 != null)
            {
                try
                {
                    obj2.DispatchSharedObjectMessage(message);
                }
                catch (Exception exception)
                {
                    obj2.RaiseNetStatus(exception);
                }
            }
        }
        internal static void Dispatch(SharedObjectMessage message)
        {
            RemoteSharedObject rso = null;

            lock ((SharedObjects as ICollection).SyncRoot)
            {
                if (SharedObjects.ContainsKey(message.Name))
                {
                    rso = SharedObjects[message.Name] as RemoteSharedObject;
                }
            }
            if (rso != null)
            {
                try
                {
                    rso.DispatchSharedObjectMessage(message);
                }
                catch (Exception ex)
                {
                    rso.RaiseNetStatus(ex);
                }
            }
        }